mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Check the return value of open() in rawlog.c
This commit is contained in:
parent
bb190be0bf
commit
8289f36075
@ -157,6 +157,11 @@ void rawlog_save(RAWLOG_REC *rawlog, const char *fname)
|
||||
f = open(path, O_WRONLY | O_APPEND | O_CREAT, log_file_create_mode);
|
||||
g_free(path);
|
||||
|
||||
if (f < 0) {
|
||||
g_warning("rawlog open() failed: %s", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
rawlog_dump(rawlog, f);
|
||||
close(f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user