]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
qdev: Fix memory leak
authordunrong huang <riegamaths@gmail.com>
Fri, 18 May 2012 11:14:13 +0000 (19:14 +0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 21 May 2012 20:40:51 +0000 (15:40 -0500)
commita340046614644a8958883954b96e92a87a5e78f7
treeab9691eacc335fc49a8abfc056ec4f53af8576ef
parent2a633c461e96cb9a856292c46917653bd43959c8
qdev: Fix memory leak

The str allocated in visit_type_str was not freed.

The visit_type_str function is an input visitor(<QMP/String/etc>-to-native)
here, it will allocate memory for caller, so the caller is responsible for
freeing the memory.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: dunrong huang <riegamaths@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev-properties.c