提交 66d341e5 编写于 作者: P Paolo Bonzini 提交者: Anthony Liguori

qdev: accept empty string properties

These were stored as NULL due to wrong cut-and-paste from set_pointer.
Reported-by: NGerhard Wiesinger <lists@wiesinger.com>
Tested-by: NGerhard Wiesinger <lists@wiesinger.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 a348f108
......@@ -421,10 +421,6 @@ static void set_string(Object *obj, Visitor *v, void *opaque,
error_propagate(errp, local_err);
return;
}
if (!*str) {
g_free(str);
str = NULL;
}
if (*ptr) {
g_free(*ptr);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册