public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Daniel P. Berrange <berrange@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/perl-Sys-Virt] epel10.2: Fix use of free() in XS binding
Date: Tue, 30 Jun 2026 07:30:26 GMT	[thread overview]
Message-ID: <178280462674.1.1676875707766655176.rpms-perl-Sys-Virt-94bec200e617@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/perl-Sys-Virt
Branch : epel10.2
Commit : 94bec200e617e6afe7d92fd339dcfd1afaed192e
Author : Daniel P. Berrange <berrange@fedoraproject.org>
Date   : 2008-03-07T22:47:03+00:00
Stats  : +78/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-Sys-Virt/c/94bec200e617e6afe7d92fd339dcfd1afaed192e?branch=epel10.2

Log:
Fix use of free() in XS binding

---
diff --git a/perl-Sys-Virt-0.1.2-free.patch b/perl-Sys-Virt-0.1.2-free.patch
new file mode 100644
index 0000000..2885f94
--- /dev/null
+++ b/perl-Sys-Virt-0.1.2-free.patch
@@ -0,0 +1,72 @@
+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

diff --git a/perl-Sys-Virt.spec b/perl-Sys-Virt.spec
index 1818bb1..054c187 100644
--- a/perl-Sys-Virt.spec
+++ b/perl-Sys-Virt.spec
@@ -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 @@ virtualization containers to be managed with a consistent API.
 
 %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 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*
 
 %changelog
+* Fri Mar 07 2008 Daniel P. Berrange <berrange@redhat.com> - 0.1.2-3
+- Fix calls to free() in XS binding
+
 * Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.2-2
 Rebuild for new perl
 

                 reply	other threads:[~2026-06-30  7:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178280462674.1.1676875707766655176.rpms-perl-Sys-Virt-94bec200e617@fedoraproject.org \
    --to=berrange@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox