aboutsummaryrefslogtreecommitdiff
path: root/qobject
diff options
context:
space:
mode:
Diffstat (limited to 'qobject')
-rw-r--r--qobject/qdict.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/qobject/qdict.c b/qobject/qdict.c
index 0f3e0a6c81..60d6cd5a0e 100644
--- a/qobject/qdict.c
+++ b/qobject/qdict.c
@@ -481,7 +481,7 @@ static void qdict_do_flatten(QDict *qdict, QDict *target, const char *prefix)
{
QObject *value;
const QDictEntry *entry, *next;
- const char *new_key;
+ char *new_key;
bool delete;
entry = qdict_first(qdict);
@@ -506,6 +506,8 @@ static void qdict_do_flatten(QDict *qdict, QDict *target, const char *prefix)
delete = true;
}
+ g_free(new_key);
+
if (delete) {
qdict_del(qdict, entry->key);