[Libvirt-cim] [PATCH] VirtualSystemManagementService: Fix yet another possible leak

Sharad Mishra snmishra at us.ibm.com
Fri Sep 9 15:21:25 UTC 2011


pushed

Sharad Mishra
Open Virtualization
Linux Technology Center
IBM

"Eduardo Lima (Etrunko)" <eblima at linux.vnet.ibm.com> wrote on 08/24/2011
10:06:46 AM:

> "Eduardo Lima (Etrunko)" <eblima at linux.vnet.ibm.com>
> 08/24/2011 10:06 AM
>
> Please respond to
> eblima at br.ibm.com
>
> To
>
> List for discussion and development of libvirt CIM
<libvirt-cim at redhat.com>
>
> cc
>
> Sharad Mishra/Beaverton/IBM at IBMUS
>
> Subject
>
> Re: [Libvirt-cim] [PATCH] VirtualSystemManagementService: Fix yet
> another possible leak
>
> On 08/24/2011 01:58 PM, Sharad Mishra wrote:
> > +1
> >
> > Eduardo, I remember you telling me that you have run cimtests
> > successfully with this patch, correct?
> >
> Yes, I checked it before posting to the mailing list. :)
>
> > Sharad Mishra
> > Open Virtualization
> > Linux Technology Center
> > IBM
> >
> > libvirt-cim-bounces at redhat.com wrote on 08/23/2011 08:12:19 AM:
> >
> >  > "Eduardo Lima \(Etrunko\)" <eblima at linux.vnet.ibm.com>
> >  > Sent by: libvirt-cim-bounces at redhat.com
> >  >
> >  > 08/23/11 08:12 AM
> >  >
> >  > Please respond to
> >  > List for discussion and development of libvirt CIM
> > <libvirt-cim at redhat.com>
> >  >
> >  > To
> >  >
> >  > libvirt-cim at redhat.com
> >  >
> >  > cc
> >  >
> >  > Subject
> >  >
> >  > [Libvirt-cim] [PATCH] VirtualSystemManagementService: Fix yet
> >  > another possible leak
> >  >
> >  > # HG changeset patch
> >  > # User Eduardo Lima (Etrunko) <eblima at br.ibm.com>
> >  > # Date 1314112289 10800
> >  > # Node ID 277b56b3863b5f81a3faa18aeb7b9951b963b489
> >  > # Parent a346baf140d64177a9dc1066677c307ee6518236
> >  > VirtualSystemManagementService: Fix yet another possible leak
> >  >
> >  > Signed-off-by: Eduardo Lima (Etrunko) <eblima at br.ibm.com>
> >  >
> >  > diff --git a/src/Virt_VirtualSystemManagementService.c b/src/
> >  > Virt_VirtualSystemManagementService.c
> >  > --- a/src/Virt_VirtualSystemManagementService.c
> >  > +++ b/src/Virt_VirtualSystemManagementService.c
> >  > @@ -1377,7 +1377,11 @@
> >  > if (tmp == NULL)
> >  > return false;
> >  >
> >  > - memcpy(tmp, *list, sizeof(*tmp) * cur);
> >  > + if (*list) {
> >  > + memcpy(tmp, *list, sizeof(*tmp) * cur);
> >  > + free(*list);
> >  > + }
> >  > +
> >  > *list = tmp;
> >  >
> >  > return true;
> >  >
> >  > _______________________________________________
> >  > Libvirt-cim mailing list
> >  > Libvirt-cim at redhat.com
> >  > https://www.redhat.com/mailman/listinfo/libvirt-cim
> >
> >
> >
> > _______________________________________________
> > Libvirt-cim mailing list
> > Libvirt-cim at redhat.com
> > https://www.redhat.com/mailman/listinfo/libvirt-cim
>
>
> --
> Eduardo de Barros Lima
> Software Engineer, Open Virtualization
> Linux Technology Center - IBM/Brazil
> eblima at br.ibm.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20110909/b12fa20d/attachment.htm>


More information about the Libvirt-cim mailing list