aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2011-05-03 16:59:55 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2011-05-03 16:59:55 +0000
commit1c041874ad9f96a0cf8a6382482234f5ea76c5e7 (patch)
tree39981a635a56f3f9567788037d5ff24154f7a70b
parent74302a4e7a0160f4e2af17a6662c5eac572fcf3d (diff)
downloadperl-URPM-1c041874ad9f96a0cf8a6382482234f5ea76c5e7.tar
perl-URPM-1c041874ad9f96a0cf8a6382482234f5ea76c5e7.tar.gz
perl-URPM-1c041874ad9f96a0cf8a6382482234f5ea76c5e7.tar.bz2
perl-URPM-1c041874ad9f96a0cf8a6382482234f5ea76c5e7.tar.xz
perl-URPM-1c041874ad9f96a0cf8a6382482234f5ea76c5e7.zip
fix some invalid free()'s
-rw-r--r--NEWS4
-rw-r--r--URPM.pm2
-rw-r--r--URPM.xs14
3 files changed, 12 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index d5dc37d..65b5c60 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Version 4.25 - May 2011, by Per Øyvind Karlsen
+
+- fix some invalid free()'s
+
Version 4.24 - 3 May 2011, by Per Øyvind Karlsen
- fix segfault caused by attempting to assign arch of wrong package
diff --git a/URPM.pm b/URPM.pm
index caa429f..396ecf0 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -11,7 +11,7 @@ use URPM::Resolve;
use URPM::Signature;
our @ISA = qw(DynaLoader);
-our $VERSION = '4.24';
+our $VERSION = '4.25';
URPM->bootstrap($VERSION);
diff --git a/URPM.xs b/URPM.xs
index d7254f0..86ca212 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2279,11 +2279,11 @@ Pkg_compare_pkg(lpkg, rpkg)
URPM::Package rpkg
PREINIT:
int compare = 0;
- char *levr;
- char *larch;
- char *revr;
- char *rarch;
- char *tmp;
+ char *levr = NULL;
+ char *larch = NULL;
+ char *revr = NULL;
+ char *rarch = NULL;
+ char *tmp = NULL;
CODE:
if (lpkg == rpkg) RETVAL = 0;
else {
@@ -2337,8 +2337,8 @@ Pkg_compare_pkg(lpkg, rpkg)
compare = rscore - lscore; /* score are lower for better */
}
}
- if (!lpkg->info) _free(larch);
- if (!rpkg->info) _free(rarch);
+ if (!lpkg->info) larch = _free(larch);
+ if (!rpkg->info) rarch = _free(rarch);
restore_chars();
RETVAL = compare;
}