[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 27/41] qdict: Fix memory leak in qdict_do_flatten()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 27/41] qdict: Fix memory leak in qdict_do_flatten() |
Date: |
Fri, 29 Nov 2013 17:45:42 +0100 |
Reported-by: Laszlo Ersek <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
qobject/qdict.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/qobject/qdict.c b/qobject/qdict.c
index 0f3e0a6..60d6cd5 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);
--
1.8.1.4
- [Qemu-devel] [PULL 18/41] util/error: Save errno from clobbering, (continued)
- [Qemu-devel] [PULL 18/41] util/error: Save errno from clobbering, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 19/41] Test coroutine execution order, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 20/41] sheepdog: implement .bdrv_get_allocated_file_size, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 21/41] block/stream: Don't stream unbacked devices, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 22/41] block: per caller dirty bitmap, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 24/41] COW: Speed up writes, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 25/41] COW: Extend checking allocated bits to beyond one sector, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 26/41] MAINTAINERS: add sheepdog development mailing list, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 23/41] qapi: Change BlockDirtyInfo to list, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 27/41] qdict: Fix memory leak in qdict_do_flatten(),
Kevin Wolf <=
- [Qemu-devel] [PULL 28/41] qdict: Optimise qdict_do_flatten(), Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 29/41] sheepdog: refactor do_sd_create(), Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 31/41] qemu-iotests: Drop local version of cancel_and_wait from 040, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 30/41] sheepdog: support user-defined redundancy option, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 32/41] blkdebug: add "remove_break" command, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 33/41] qemu-iotest: Add pause_drive and resume_drive methods, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 34/41] qemu-iotests: Make test case 030, 040 and 055 deterministic, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 35/41] block: Enable BDRV_O_SNAPSHOT with driver-specific options, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 37/41] block: Use BDRV_O_NO_BACKING where appropriate, Kevin Wolf, 2013/11/29
- [Qemu-devel] [PULL 36/41] qemu-iotests: Test snapshot mode, Kevin Wolf, 2013/11/29