From fdf0f2bf5ef55ef91ae30fdde425660bdc235f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Wed, 27 Apr 2011 00:48:10 +0000 Subject: catch another memleak --- URPM.xs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/URPM.xs b/URPM.xs index ef35387..90888ff 100644 --- a/URPM.xs +++ b/URPM.xs @@ -2249,7 +2249,7 @@ Pkg_fullname(pkg) XPUSHs(sv_2mortal(newSVpv(pkg->info, eos-pkg->info))); } else if (pkg->h) { const char *nvra = get_nvra(pkg->h); - XPUSHs(sv_2mortal(newSVpvf("%s", nvra))); + XPUSHs(sv_2mortal(newSVpv(nvra, 0))); _free(nvra); } } @@ -4510,6 +4510,7 @@ expand(name) PPCODE: const char * value = rpmExpand(name, NULL); XPUSHs(sv_2mortal(newSVpv(value, 0))); + _free(value) void add_macro_noexpand(macro) -- cgit v1.2.1