projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dce32b6
)
qdict: Fix memory leak in qdict_do_flatten()
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 20 Nov 2013 12:09:20 +0000
(13:09 +0100)
committer
Kevin Wolf
<kwolf@redhat.com>
Fri, 29 Nov 2013 12:40:37 +0000
(13:40 +0100)
Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qobject/qdict.c
patch
|
blob
|
history
diff --git
a/qobject/qdict.c
b/qobject/qdict.c
index 0f3e0a6c81158d3de71711e5f047e71648d9e96e..60d6cd5a0ed0de7b05ef9af93c9c4983fa18a54c 100644
(file)
--- 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;
- c
onst c
har *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);