Skip to content

Commit b58c86e

Browse files
stweilAnthony Liguori
authored and
Anthony Liguori
committed
fsdev: Fix potential memory leak
This leak was reported by cppcheck. Signed-off-by: Stefan Weil <[email protected]> Reviewed-by: M. Mohan Kumar <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
1 parent edb5092 commit b58c86e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fsdev/qemu-fsdev.c

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ int qemu_fsdev_add(QemuOpts *opts)
7676

7777
if (fsle->fse.ops->parse_opts) {
7878
if (fsle->fse.ops->parse_opts(opts, &fsle->fse)) {
79+
g_free(fsle->fse.fsdev_id);
80+
g_free(fsle);
7981
return -1;
8082
}
8183
}

0 commit comments

Comments
 (0)