aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-12-15 11:05:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-12-15 11:05:31 +0000
commit25ca91a66d8be65e5a0aa544e2deefdde4b38f7a (patch)
tree4555afcb606ce95d9c7a13413d9b3a71b3152fdc /URPM.xs
parent3997478673f694c20b3ca8fbcd39feff23215437 (diff)
downloadperl-URPM-25ca91a66d8be65e5a0aa544e2deefdde4b38f7a.tar
perl-URPM-25ca91a66d8be65e5a0aa544e2deefdde4b38f7a.tar.gz
perl-URPM-25ca91a66d8be65e5a0aa544e2deefdde4b38f7a.tar.bz2
perl-URPM-25ca91a66d8be65e5a0aa544e2deefdde4b38f7a.tar.xz
perl-URPM-25ca91a66d8be65e5a0aa544e2deefdde4b38f7a.zip
- fix bad free() (thanks to glibc for detecting it)
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs8
1 files changed, 4 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index 13fa296..cfbfad1 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -468,14 +468,14 @@ return_list_str(char *s, Header header, int32_t tag_name, int32_t tag_flags, int
if (f(NULL, 0, rpmtdGetString(&list), flag ? *flag : 0,
rpmtdNextString(&list_evr), param)) {
rpmtdFreeData(&list);
- rpmtdFreeData(&flags);
- rpmtdFreeData(&list_evr);
+ if (tag_flags) rpmtdFreeData(&flags);
+ if (tag_version) rpmtdFreeData(&list_evr);
return -count;
}
}
rpmtdFreeData(&list);
- rpmtdFreeData(&flags);
- rpmtdFreeData(&list_evr);
+ if (tag_flags) rpmtdFreeData(&flags);
+ if (tag_version) rpmtdFreeData(&list_evr);
}
}
return count;