summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-24 21:36:18 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-24 21:36:18 +0000
commita9540e2c7629bd7ecd7e98a562f77e33a289dba9 (patch)
tree0b16fb39d732d80f6303750f60fabc93b4a94c42 /lib
parent62d99577391e979f2985677e86fc7ace78c95416 (diff)
downloadpacman-a9540e2c7629bd7ecd7e98a562f77e33a289dba9.tar.xz
fixed potential memory leaks
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/package.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index b5e5bf36..c448478e 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -260,14 +260,17 @@ pmpkg_t *pkg_load(char *pkgfile)
tar_extract_file(tar, descfile);
/* parse the info file */
if(parse_descfile(descfile, info, 0) == -1) {
+ FREE(descfile);
goto error;
}
if(!strlen(info->name)) {
_alpm_log(PM_LOG_ERROR, "missing package name in %s", pkgfile);
+ FREE(descfile);
goto error;
}
if(!strlen(info->version)) {
_alpm_log(PM_LOG_ERROR, "missing package version in %s", pkgfile);
+ FREE(descfile);
goto error;
}
config = 1;