mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-25 11:54:04 +00:00
Do not leak log file descriptor.
This commit is contained in:
parent
ddb2d1221b
commit
69ea6b9373
1 changed files with 3 additions and 0 deletions
3
log.c
3
log.c
|
|
@ -42,6 +42,9 @@ log_event_cb(unused int severity, const char *msg)
|
|||
void
|
||||
log_open(const char *path)
|
||||
{
|
||||
if (log_file != NULL)
|
||||
fclose(log_file);
|
||||
|
||||
log_file = fopen(path, "w");
|
||||
if (log_file == NULL)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue