pushed
Sharad Mishra
Open Virtualization
Linux Technology Center
IBM
"Eduardo Lima (Etrunko)" <eblima(a)linux.vnet.ibm.com> wrote on 08/24/2011
10:06:46 AM:
"Eduardo Lima (Etrunko)" <eblima(a)linux.vnet.ibm.com>
08/24/2011 10:06 AM
Please respond to
eblima(a)br.ibm.com
To
List for discussion and development of libvirt CIM
cc
Sharad Mishra/Beaverton/IBM@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(a)redhat.com wrote on 08/23/2011 08:12:19 AM:
>
> > "Eduardo Lima \(Etrunko\)" <eblima(a)linux.vnet.ibm.com>
> > Sent by: libvirt-cim-bounces(a)redhat.com
> >
> > 08/23/11 08:12 AM
> >
> > Please respond to
> > List for discussion and development of libvirt CIM
> <libvirt-cim(a)redhat.com>
> >
> > To
> >
> > libvirt-cim(a)redhat.com
> >
> > cc
> >
> > Subject
> >
> > [Libvirt-cim] [PATCH] VirtualSystemManagementService: Fix yet
> > another possible leak
> >
> > # HG changeset patch
> > # User Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
> > # Date 1314112289 10800
> > # Node ID 277b56b3863b5f81a3faa18aeb7b9951b963b489
> > # Parent a346baf140d64177a9dc1066677c307ee6518236
> > VirtualSystemManagementService: Fix yet another possible leak
> >
> > Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)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(a)redhat.com
> >
https://www.redhat.com/mailman/listinfo/libvirt-cim
>
>
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim(a)redhat.com
>
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima(a)br.ibm.com