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: NStefan Weil <sw@weilnetz.de> Signed-off-by: Ndunrong huang <riegamaths@gmail.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Showing
想要评论请 注册 或 登录