aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-06-16 12:02:40 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-09 13:38:56 -0500
commitb58c86e1e4cdf59373aad2ec25f99f772766374c (patch)
treec453f3e3c33eea0580141f448f0b62d7076e1d52
parentedb5092c245d34e05ca410d4bf32cf0c2786c8e8 (diff)
fsdev: Fix potential memory leak
This leak was reported by cppcheck. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com> Message-id: 1371376960-18192-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--fsdev/qemu-fsdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c
index 6eaf36dbfa..ccfec139ab 100644
--- a/fsdev/qemu-fsdev.c
+++ b/fsdev/qemu-fsdev.c
@@ -76,6 +76,8 @@ int qemu_fsdev_add(QemuOpts *opts)
if (fsle->fse.ops->parse_opts) {
if (fsle->fse.ops->parse_opts(opts, &fsle->fse)) {
+ g_free(fsle->fse.fsdev_id);
+ g_free(fsle);
return -1;
}
}