aboutsummaryrefslogtreecommitdiffstats
path: root/rpm5compat.h
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-02-29 21:26:51 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-02-29 21:26:51 +0000
commite30262cc17768fcad84c48698666d75e17726071 (patch)
tree71459211cf8b0c64dbafd1017f1c089331647cd9 /rpm5compat.h
parent9c4aaad7df7284d0a752400e1a27012513832f85 (diff)
downloadperl-URPM-e30262cc17768fcad84c48698666d75e17726071.tar
perl-URPM-e30262cc17768fcad84c48698666d75e17726071.tar.gz
perl-URPM-e30262cc17768fcad84c48698666d75e17726071.tar.bz2
perl-URPM-e30262cc17768fcad84c48698666d75e17726071.tar.xz
perl-URPM-e30262cc17768fcad84c48698666d75e17726071.zip
try improve on freeing up memory
Diffstat (limited to 'rpm5compat.h')
-rw-r--r--rpm5compat.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/rpm5compat.h b/rpm5compat.h
index bf2c927..fcdb327 100644
--- a/rpm5compat.h
+++ b/rpm5compat.h
@@ -115,13 +115,8 @@ static HeaderIterator headerInitIterator(Header h){
}
void * headerFreeData(const void * data, rpmTagType type) {
- if (data) {
- if (type == -1 ||
- type == RPM_STRING_ARRAY_TYPE ||
- type == RPM_I18NSTRING_TYPE ||
- type == RPM_BIN_TYPE)
- free((void *)data);
- }
+ if (data)
+ free((void *)data);
return NULL;
}