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>
This commit is contained in:
Stefan Weil 2013-06-16 12:02:40 +02:00 committed by Anthony Liguori
parent edb5092c24
commit b58c86e1e4

View file

@ -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;
}
}