diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-15 12:02:22 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-15 12:03:32 +0100 |
commit | b5599b8e369c747ee54902f9467288f3713f93bc (patch) | |
tree | 79b2107ed3117c0368cf9ed5b6663353eb8165d2 /build-aux | |
parent | 9a51ad256f29b213a4288bf5a3e85b6fd73c853f (diff) |
qmi-codegen,field: plug memleak when processing errors in printable output
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/qmi-codegen/Field.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/qmi-codegen/Field.py b/build-aux/qmi-codegen/Field.py index 8a09dc0..80c5c9e 100644 --- a/build-aux/qmi-codegen/Field.py +++ b/build-aux/qmi-codegen/Field.py @@ -380,8 +380,10 @@ class Field: ' g_string_append_printf (printable, "Additional unexpected \'%" G_GSIZE_FORMAT "\' bytes", offset);\n' '\n' 'out:\n' - ' if (error)\n' + ' if (error) {\n' ' g_string_append_printf (printable, " ERROR: %s", error->message);\n' + ' g_error_free (error);\n' + ' }\n' ' return g_string_free (printable, FALSE);\n' '}\n') f.write(string.Template(template).substitute(translations)) |