summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/sync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index f8193962..57097fd1 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -333,7 +333,9 @@ int SYMEXPORT alpm_sync_dbtarget(char *dbname, char *target)
if(dbs == NULL) {
RET_ERR(PM_ERR_PKG_REPO_NOT_FOUND, -1);
}
- return(sync_target(dbs, target));
+ int ret = sync_target(dbs, target);
+ alpm_list_free(dbs);
+ return(ret);
}
/** Add a sync target to the transaction.