[libvirt] [PATCH] libvirt-perl: Use correct free() in get_cpu_model_names

Olaf Hering olaf at aepfle.de
Sat Dec 14 18:15:02 UTC 2013


Make check currently fails for me due to wrong free usage in
get_cpu_model_names. names is allocated by libvirt, so it should be
released with just free().

> t/100-connect..........panic: free from wrong pool at t/100-connect.t line 81.
> # Looks like you planned 25 tests but only ran 24.
> # Looks like your test died just after 24.
> dubious
> Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED test 25
> Failed 1/25 tests, 96.00% okay (less 1 skipped test: 23 okay, 92.00%)

Signed-off-by: Olaf Hering <olaf at aepfle.de>
---
 Virt.xs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Virt.xs b/Virt.xs
index 33758d1..27ca445 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -1925,7 +1925,7 @@ PREINIT:
           PUSHs(sv_2mortal(newSVpv(names[i], 0)));
           free(names[i]);
       }
-      Safefree(names);
+      free(names);
 
 
 




More information about the libvir-list mailing list