Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-09-07 22:22:25 -0400
committerDan McGee <dan@archlinux.org>2011-09-08 14:18:19 -0500
commitdb70c9da153c4767bfd96a15d40e086184bd5402 (patch)
tree550956024d66f72d699143066c69c8ca3b25d73f
parenta03313f3f66e9ac03392cb255bc6c4e1958e14c2 (diff)
diskspace: fix memory leak on root mount not found
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/diskspace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index df414ab9..fe2036d5 100644
--- a/lib/libalpm/diskspace.c
+++ b/lib/libalpm/diskspace.c
@@ -251,7 +251,8 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
if(root_mp == NULL) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not determine root mount point %s\n"),
handle->root);
- return -1;
+ error = 1;
+ goto finish;
}
replaces = alpm_list_count(trans->remove);
@@ -319,6 +320,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
}
}
+finish:
for(i = mount_points; i; i = i->next) {
alpm_mountpoint_t *data = i->data;
FREE(data->mount_dir);