Message ID | 1330419255-5566-2-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
Works well, Tested-by: Gerhard Wiesinger <lists@wiesinger.com> Ciao, Gerhard -- http://www.wiesinger.com/ On Tue, 28 Feb 2012, Paolo Bonzini wrote: > These were stored as NULL due to wrong cut-and-paste from set_pointer. > > Reported-by: Gerhard Wiesinger <lists@wiesinger.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > hw/qdev-properties.c | 4 ---- > 1 files changed, 0 insertions(+), 4 deletions(-) > > diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c > index 0423af1..bff9152 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); > } > -- > 1.7.7.6 > > >
Am 28.02.2012 09:54, schrieb Paolo Bonzini: > These were stored as NULL due to wrong cut-and-paste from set_pointer. > > Reported-by: Gerhard Wiesinger <lists@wiesinger.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> /-F > --- > hw/qdev-properties.c | 4 ---- > 1 files changed, 0 insertions(+), 4 deletions(-) > > diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c > index 0423af1..bff9152 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); > }
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 0423af1..bff9152 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); }
These were stored as NULL due to wrong cut-and-paste from set_pointer. Reported-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- hw/qdev-properties.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)