summaryrefslogtreecommitdiffstats
path: root/src/package.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c
index 04f307d..5e1cf6f 100644
--- a/src/package.c
+++ b/src/package.c
@@ -2368,6 +2368,7 @@ void slapt_purge_old_cached_pkgs(const slapt_rc_config *global_config,
perror(dir_name);
fprintf(stderr,gettext("Failed to chdir: %s\n"),dir_name);
+ closedir(dir);
return;
}
@@ -2448,6 +2449,7 @@ void slapt_clean_pkg_dir(const char *dir_name)
if (chdir(dir_name) == -1 ) {
fprintf(stderr,gettext("Failed to chdir: %s\n"),dir_name);
+ closedir(dir);
return;
}