From bff39b6360eefc65b9f8f438cf03dab21afba5bf Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 17 Oct 2011 22:12:09 +0200 Subject: device_tree: Fix potential memory leak cppcheck error report: device_tree.c:156: error: Memory leak: dupname Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- device_tree.c | 1 + 1 file changed, 1 insertion(+) (limited to 'device_tree.c') diff --git a/device_tree.c b/device_tree.c index dc69232f10..86a694c955 100644 --- a/device_tree.c +++ b/device_tree.c @@ -153,6 +153,7 @@ int qemu_devtree_add_subnode(void *fdt, const char *name) int retval; if (!basename) { + g_free(dupname); return -1; } -- cgit v1.2.3