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:
Paolo Bonzini 2012-02-28 09:54:14 +01:00 committed by Anthony Liguori
parent a348f10884
commit 66d341e54f

View File

@ -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);
}