summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-05-03 16:46:18 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-05-03 16:46:18 +0000
commit251e52cea747dde9af5b3898cde94b8c6533463f (patch)
treec641fd64c2fbe098d5cebdf3375091055417cc2e /lib
parentc99a4c85c0763b1f7f21a157eecf614c626330b6 (diff)
downloadpacman-251e52cea747dde9af5b3898cde94b8c6533463f.tar.xz
fixed a small memory leak with md5sums handling
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 95c9a006..d0adb10b 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -497,6 +497,7 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
if(tar_extract_file(tar, temp)) {
alpm_logaction("could not extract %s: %s", pathname, strerror(errno));
errors++;
+ FREE(md5_local);
continue;
}
md5_pkg = MDFile(temp);
@@ -627,6 +628,7 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
/* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
MALLOC(fn, strlen(file)+34);
sprintf(fn, "%s\t%s", file, md5);
+ FREE(md5);
FREE(file);
lp->data = fn;
}