[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/29] block: Fix memory leak in hmp_drive_add_node()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 02/29] block: Fix memory leak in hmp_drive_add_node() |
Date: |
Thu, 17 Mar 2016 16:56:15 +0100 |
hmp_drive_add_node() leaked qdict in the error path when no node-name is
specified.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
blockdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/blockdev.c b/blockdev.c
index e7b8676..50410bf 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3898,6 +3898,7 @@ void hmp_drive_add_node(Monitor *mon, const char *optstr)
qdict = qemu_opts_to_qdict(opts, NULL);
if (!qdict_get_try_str(qdict, "node-name")) {
+ QDECREF(qdict);
error_report("'node-name' needs to be specified");
goto out;
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/29] Block patches, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 03/29] monitor: Use BB list for BB name completion, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 01/29] block: Fix qemu_root_bds_opts.head initialisation, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 05/29] block: Add blk_commit_all(), Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 02/29] block: Fix memory leak in hmp_drive_add_node(),
Kevin Wolf <=
- [Qemu-devel] [PULL 04/29] block: Use blk_next() in block-backend.c, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 07/29] qapi: Drop QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 09/29] blockdev: Rename blk_backends, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 08/29] block: Drop BB name from bad option error, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 06/29] block: Use blk_{commit, flush}_all() consistently, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 10/29] blockdev: Add list of all BlockBackends, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 11/29] blockdev: Separate BB name management, Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 16/29] block: Add blk_next_root_bs(), Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 13/29] blockdev: Remove blk_hide_on_behalf_of_hmp_drive_del(), Kevin Wolf, 2016/03/17
- [Qemu-devel] [PULL 15/29] block: Add bdrv_next_monitor_owned(), Kevin Wolf, 2016/03/17