Author: berrange Update of /cvs/pkgs/rpms/perl-Sys-Virt/devel In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23735 Modified Files: perl-Sys-Virt.spec Added Files: perl-Sys-Virt-0.1.2-free.patch Log Message: Fix use of free() in XS binding perl-Sys-Virt-0.1.2-free.patch: --- NEW FILE perl-Sys-Virt-0.1.2-free.patch --- diff -rup Sys-Virt-0.1.2.orig/Virt.xs Sys-Virt-0.1.2.new/Virt.xs --- Sys-Virt-0.1.2.orig/Virt.xs 2008-02-23 14:15:14.000000000 -0500 +++ Sys-Virt-0.1.2.new/Virt.xs 2008-03-07 17:36:28.000000000 -0500 @@ -197,13 +197,14 @@ list_domain_ids(con, maxids) PPCODE: Newx(ids, maxids, int); if ((nid = virConnectListDomains(con, ids, maxids)) < 0) { + Safefree(ids); _croak_error(virConnGetLastError(con)); } EXTEND(SP, nid); for (i = 0 ; i < nid ; i++) { PUSHs(sv_2mortal(newSViv(ids[i]))); } - free(ids); + Safefree(ids); int @@ -227,7 +228,7 @@ list_defined_domain_names(con, maxnames) PPCODE: Newx(names, maxnames, char *); if ((ndom = virConnectListDefinedDomains(con, names, maxnames)) < 0) { - free(names); + Safefree(names); _croak_error(virConnGetLastError(con)); } EXTEND(SP, ndom); @@ -235,7 +236,7 @@ list_defined_domain_names(con, maxnames) PUSHs(sv_2mortal(newSVpv(names[i], 0))); free(names[i]); } - free(names); + Safefree(names); int @@ -258,6 +259,7 @@ list_network_names(con, maxnames) PPCODE: Newx(names, maxnames, char *); if ((nnet = virConnectListNetworks(con, names, maxnames)) < 0) { + Safefree(names); _croak_error(virConnGetLastError(con)); } EXTEND(SP, nnet); @@ -265,7 +267,7 @@ list_network_names(con, maxnames) PUSHs(sv_2mortal(newSVpv(names[i], 0))); free(names[i]); } - free(names); + Safefree(names); int @@ -289,7 +291,7 @@ list_defined_network_names(con, maxnames PPCODE: Newx(names, maxnames, char *); if ((ndom = virConnectListDefinedNetworks(con, names, maxnames)) < 0) { - free(names); + Safefree(names); _croak_error(virConnGetLastError(con)); } EXTEND(SP, ndom); @@ -297,7 +299,7 @@ list_defined_network_names(con, maxnames PUSHs(sv_2mortal(newSVpv(names[i], 0))); free(names[i]); } - free(names); + Safefree(names); void Index: perl-Sys-Virt.spec =================================================================== RCS file: /cvs/pkgs/rpms/perl-Sys-Virt/devel/perl-Sys-Virt.spec,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- perl-Sys-Virt.spec 7 Mar 2008 02:17:12 -0000 1.12 +++ perl-Sys-Virt.spec 7 Mar 2008 22:47:03 -0000 1.13 @@ -1,11 +1,12 @@ Name: perl-Sys-Virt Version: 0.1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Represent and manage a libvirt hypervisor connection License: GPLv2+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Sys-Virt/ Source0: http://www.cpan.org/authors/id/D/DA/DANBERR/Sys-Virt-%{version}.tar.gz +Patch1: %{name}-%{version}-free.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::Pod) @@ -21,6 +22,7 @@ %prep %setup -q -n Sys-Virt-%{version} +%patch1 -p1 sed -i -e '/Sys-Virt\.spec/d' Makefile.PL sed -i -e '/\.spec\.PL$/d' MANIFEST @@ -59,6 +61,9 @@ %{_mandir}/man3/* %changelog +* Fri Mar 07 2008 Daniel P. Berrange <berrange@xxxxxxxxxx> - 0.1.2-3 +- Fix calls to free() in XS binding + * Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> - 0.1.2-2 Rebuild for new perl -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl Fedora-perl-devel-list mailing list Fedora-perl-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list