On 04/08/2014 08:47 AM, Daniel P. Berrange wrote: > If virNWFilterVarValueCreateSimple fails with OOM, then > 'val' will be leaked by virNWFilterVarValueCreateSimpleCopyValue > > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> > --- > src/conf/nwfilter_params.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) ACK > > diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c > index 40eccc4..3e85bc1 100644 > --- a/src/conf/nwfilter_params.c > +++ b/src/conf/nwfilter_params.c > @@ -126,10 +126,14 @@ virNWFilterVarValuePtr > virNWFilterVarValueCreateSimpleCopyValue(const char *value) > { > char *val; > + virNWFilterVarValuePtr ret; > > if (VIR_STRDUP(val, value) < 0) > return NULL; > - return virNWFilterVarValueCreateSimple(val); > + ret = virNWFilterVarValueCreateSimple(val); > + if (!ret) > + VIR_FREE(val); > + return ret; > } > > const char * > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list