qdev: accept empty string properties
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Feb 2012 08:54:14 +0000 (09:54 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 12 Mar 2012 19:05:25 +0000 (14:05 -0500)
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>
hw/qdev-properties.c

index 0423af1c311b1d7a9d284f5250d214b17538f475..bff9152df5c57dfddd1e3ee60822abd6ec9d0e04 100644 (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);
     }