mirror of https://github.com/xqemu/xqemu.git
qdev: accept empty string properties
These were stored as NULL due to wrong cut-and-paste from set_pointer. Reported-by: Gerhard Wiesinger <lists@wiesinger.com> Tested-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a348f10884
commit
66d341e54f
|
@ -421,10 +421,6 @@ static void set_string(Object *obj, Visitor *v, void *opaque,
|
||||||
error_propagate(errp, local_err);
|
error_propagate(errp, local_err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!*str) {
|
|
||||||
g_free(str);
|
|
||||||
str = NULL;
|
|
||||||
}
|
|
||||||
if (*ptr) {
|
if (*ptr) {
|
||||||
g_free(*ptr);
|
g_free(*ptr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue