mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Check the return value of open() in rawlog.c
This commit is contained in:
parent
bb190be0bf
commit
8289f36075
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue