diff options
author | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2007-07-20 13:43:47 +0000 |
---|---|---|
committer | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2007-07-20 13:43:47 +0000 |
commit | 076a2f9e679207ec1f0e106ec86a8c044b6d5201 (patch) | |
tree | 44c71a44cd38e1064c8b06d7e9b3a3b3a79880c4 /RPM4/src/RPM4.xs | |
parent | 72114e413e229865957b738e05872ca59dabc6ac (diff) | |
download | perl-RPM4-076a2f9e679207ec1f0e106ec86a8c044b6d5201.tar perl-RPM4-076a2f9e679207ec1f0e106ec86a8c044b6d5201.tar.gz perl-RPM4-076a2f9e679207ec1f0e106ec86a8c044b6d5201.tar.bz2 perl-RPM4-076a2f9e679207ec1f0e106ec86a8c044b6d5201.tar.xz perl-RPM4-076a2f9e679207ec1f0e106ec86a8c044b6d5201.zip |
- fix memleak
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@135 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/src/RPM4.xs')
-rw-r--r-- | RPM4/src/RPM4.xs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index 064d5da..257e563 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -2810,6 +2810,7 @@ Spec_binrpm(spec) Package pkg; const char * binFormat; char * binRpm; + char * path; PPCODE: for(pkg = spec->packages; pkg != NULL; pkg = pkg->next) { if (pkg->fileList == NULL) @@ -2819,7 +2820,9 @@ Spec_binrpm(spec) binRpm = headerSprintf(pkg->header, binFormat, rpmTagTable, rpmHeaderFormats, NULL); _free(binFormat); - XPUSHs(sv_2mortal(newSVpv(rpmGetPath("%{_rpmdir}/", binRpm, NULL), 0))); + path = rpmGetPath("%{_rpmdir}/", binRpm, NULL); + XPUSHs(sv_2mortal(newSVpv(path, 0))); + _free(path); _free(binRpm); } |