From acd9269478dbc40f1dac64d8f6ddfbb5f562ad09 Mon Sep 17 00:00:00 2001 From: Jonathan Conder Date: Sat, 5 Feb 2011 13:39:37 +1300 Subject: Fix double close of the lock file According to FOPEN(3), using fclose on an fdopen'd file stream also closes the underlying file descriptor. This happened in _alpm_lckmk (util.c), which meant that when alpm_trans_release closed it again, the log file (which reused the original file descriptor) was closed instead. Signed-off-by: Jonathan Conder Signed-off-by: Dan McGee --- lib/libalpm/handle.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/libalpm/handle.c') diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 8872ed0a..d4ebe82a 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -49,7 +49,6 @@ pmhandle_t *_alpm_handle_new() ALPM_LOG_FUNC; CALLOC(handle, 1, sizeof(pmhandle_t), RET_ERR(PM_ERR_MEMORY, NULL)); - handle->lckfd = -1; return(handle); } -- cgit v1.2.3-70-g09d2