summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2012-11-24 19:15:04 +0100
committerAllan McRae <allan@archlinux.org>2012-12-14 03:35:34 +0100
commit964640fbfcde48b7937a6c18964c78a3b11db3de (patch)
tree45673e7952283f229afda38c3f753b1052a4082e /lib/libalpm/sync.c
parentc8417f3386155028015f7f9fc43f4c64a60acf4c (diff)
downloadpacman-964640fbfcde48b7937a6c18964c78a3b11db3de.tar.gz
pacman-964640fbfcde48b7937a6c18964c78a3b11db3de.tar.xz
Plug various minor memory leaks
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 841e5d6f..a4e58605 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -698,7 +698,7 @@ static int apply_deltas(alpm_handle_t *handle)
snprintf(from, len, "%s/%s", cachedir, d->from);
}
len = strlen(cachedir) + strlen(d->to) + 2;
- MALLOC(to, len, RET_ERR(handle, ALPM_ERR_MEMORY, 1));
+ MALLOC(to, len, free(from); RET_ERR(handle, ALPM_ERR_MEMORY, 1));
snprintf(to, len, "%s/%s", cachedir, d->to);
/* build the patch command */