summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-04-02 00:44:30 +0200
committerDan McGee <dan@archlinux.org>2008-04-02 01:08:58 +0200
commitab9187d07de03e6545881a72180e76e728317bb9 (patch)
tree76970a8f5332d4edf8ccfcaea9c48e53207370eb /lib/libalpm
parentd9b9e60d7d4943ec0395a66bd40d22089cfbee35 (diff)
downloadpacman-ab9187d07de03e6545881a72180e76e728317bb9.tar.gz
pacman-ab9187d07de03e6545881a72180e76e728317bb9.tar.xz
Set handle->logstream to null after fclose()
We correctly closed the logfile stream when recalling set_logfile, but did not NULL out the dead pointer once we did this. Fix the problem which was the cause of FS#10056. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/handle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index aaadd86d..36822285 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -427,6 +427,7 @@ int SYMEXPORT alpm_option_set_logfile(const char *logfile)
}
if(handle->logstream) {
fclose(handle->logstream);
+ handle->logstream = NULL;
}
_alpm_log(PM_LOG_DEBUG, "option 'logfile' = %s\n", handle->logfile);
return(0);