From 6bcfd69975a8641adbd3661334e37d7230115ed6 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 1 Apr 2008 17:44:30 -0500 Subject: [PATCH] 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 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 899ac88..e9df0aa 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -426,6 +426,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); -- 1.5.4.5