summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-02-28 09:54:14 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-03-12 14:05:25 -0500
commit66d341e54f7b81ff076ffd681ed574d557bd7495 (patch)
tree5e97ed416746ee5e5da074215dcec86501976c1d
parenta348f108842fb928563865c9918642900cd0d477 (diff)
downloadqemu-66d341e54f7b81ff076ffd681ed574d557bd7495.zip
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>
-rw-r--r--hw/qdev-properties.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 0423af1c31..bff9152df5 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -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);
}