+1

Eduardo, I remember you telling me that you have run cimtests successfully with this patch, correct?

Sharad Mishra
Open Virtualization
Linux Technology Center
IBM

libvirt-cim-bounces@redhat.com wrote on 08/23/2011 08:12:19 AM:

> "Eduardo Lima \(Etrunko\)" <eblima@linux.vnet.ibm.com>

> Sent by: libvirt-cim-bounces@redhat.com
>

> 08/23/11 08:12 AM
>
> Please respond to
> List for discussion and development of libvirt CIM <libvirt-cim@redhat.com>

>
> To

>
> libvirt-cim@redhat.com

>
> cc

>
> Subject

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

>
> # HG changeset patch
> # User Eduardo Lima (Etrunko) <eblima@br.ibm.com>
> # Date 1314112289 10800
> # Node ID 277b56b3863b5f81a3faa18aeb7b9951b963b489
> # Parent  a346baf140d64177a9dc1066677c307ee6518236
> VirtualSystemManagementService: Fix yet another possible leak
>
> Signed-off-by: Eduardo Lima (Etrunko) <eblima@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@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim