mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
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>
This commit is contained in:
parent
d9b9e60d7d
commit
ab9187d07d
@ -427,6 +427,7 @@ int SYMEXPORT alpm_option_set_logfile(const char *logfile)
|
|||||||
}
|
}
|
||||||
if(handle->logstream) {
|
if(handle->logstream) {
|
||||||
fclose(handle->logstream);
|
fclose(handle->logstream);
|
||||||
|
handle->logstream = NULL;
|
||||||
}
|
}
|
||||||
_alpm_log(PM_LOG_DEBUG, "option 'logfile' = %s\n", handle->logfile);
|
_alpm_log(PM_LOG_DEBUG, "option 'logfile' = %s\n", handle->logfile);
|
||||||
return(0);
|
return(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user