diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 18:51:34 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 18:51:34 +0200 |
commit | a2844ab0414b51e0e4abfda22d79912345e48d08 (patch) | |
tree | bd8e3e61f5d94d52b204d3498b1ae143b757c873 | |
parent | 243686a0448da21e23d8c38d09fe7b5e67166b32 (diff) |
qmi-codegen: fix memleak in generated code
The contents of the containers were not being freed properly.
-rw-r--r-- | build-aux/qmi-codegen/Container.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/build-aux/qmi-codegen/Container.py b/build-aux/qmi-codegen/Container.py index 3de932a..4b9e2f9 100644 --- a/build-aux/qmi-codegen/Container.py +++ b/build-aux/qmi-codegen/Container.py @@ -210,14 +210,13 @@ class Container: ' g_return_if_fail (self != NULL);\n' '\n' ' if (g_atomic_int_dec_and_test (&self->ref_count)) {\n') - cfile.write(string.Template(template).substitute(translations)) if self.fields is not None: for field in self.fields: if field.variable is not None and field.variable.needs_dispose is True: template += field.variable.build_dispose(' ', 'self->' + field.variable_name) - template = ( + template += ( ' g_slice_free (${camelcase}, self);\n' ' }\n' '}\n') |