From 964640fbfcde48b7937a6c18964c78a3b11db3de Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sat, 24 Nov 2012 13:15:04 -0500 Subject: Plug various minor memory leaks Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- lib/libalpm/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/sync.c') 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 */ -- cgit v1.2.3-24-g4f1b