From ab9187d07de03e6545881a72180e76e728317bb9 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 1 Apr 2008 17:44:30 -0500 Subject: 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 --- lib/libalpm/handle.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v1.2.3-24-g4f1b