Skip to contentSkip to conversation

libxl: fix double free at get_all_assigned_devices

PATCH In review Marek Marczykowski 2 participants 3 messages Sep 4, 2011 – Sep 27, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: fix double free at get_all_assigned_devices

# HG changeset patch
# User Marek Marczykowski <[email protected]> # Date 1315172996 -7200
# Node ID 4683409fac3d4fef836ce78f01f12b31f5f9e12a # Parent 6239209bb560b4931d4d97456c82c1a5ca4bd10a
libxl: fix double free at get_all_assigned_devices

Do not free() list manually - it will be freed by libxl__free_all.

tools/libxl/libxl_pci.c +0 -1
@@ -469,7 +469,6 @@ static int get_all_assigned_devices(libx
     }
 
     if ( 0 == *num ) {
-        free(pcidevs);
         pcidevs = NULL;
     }else{
         *list = pcidevs;
#1 lore raw
Quoted 10 lines · Marek Marczykowski

# HG changeset patch
# User Marek Marczykowski <[email protected]> # Date 1315172996 -7200
# Node ID 4683409fac3d4fef836ce78f01f12b31f5f9e12a # Parent 6239209bb560b4931d4d97456c82c1a5ca4bd10a
libxl: fix double free at get_all_assigned_devices

Do not free() list manually - it will be freed by libxl__free_all.

Ah, it is for xen-4.1. In unstable seems to be ok.

Quoted 13 lines
tools/libxl/libxl_pci.c +0 -1
@@ -469,7 +469,6 @@ static int get_all_assigned_devices(libx
     }
 
     if ( 0 == *num ) {
-        free(pcidevs);
         pcidevs = NULL;
     }else{
         *list = pcidevs;
Signature · 3 lines
Pozdrawiam / Best Regards,
Marek Marczykowski         | RLU #390519
marmarek at mimuw edu pl   | xmpp:marmarek at staszic waw pl

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Re: [PATCH] libxl: fix double free at get_all_assigned_devices [and 1 more messages]

Marek Marczykowski writes ("[Xen-devel] Re: [PATCH] libxl: fix double free at get_all_assigned_devices"):

Quoted 8 lines · Marek Marczykowski
Quoted 5 lines

libxl: fix double free at get_all_assigned_devices

Do not free() list manually - it will be freed by libxl__free_all.

Ah, it is for xen-4.1. In unstable seems to be ok.

Acked and applied to 4.1, thanks.

Ian.