device_tree: Fix potential memory leak
cppcheck error report: device_tree.c:156: error: Memory leak: dupname Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
d300854b1c
commit
bff39b6360
@ -153,6 +153,7 @@ int qemu_devtree_add_subnode(void *fdt, const char *name)
|
||||
int retval;
|
||||
|
||||
if (!basename) {
|
||||
g_free(dupname);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user