mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
Fix missing error check.
The notmuch_message_file_open function is perfectly capable of returning NULL. So check for it.
This commit is contained in:
parent
6a4992bc61
commit
90f93fc9c7
1 changed files with 4 additions and 0 deletions
|
@ -502,6 +502,10 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
|
|||
unsigned int i;
|
||||
|
||||
message = notmuch_message_file_open (filename);
|
||||
if (message == NULL) {
|
||||
ret = NOTMUCH_STATUS_FILE_ERROR;
|
||||
goto DONE;
|
||||
}
|
||||
|
||||
notmuch_message_file_restrict_headers (message,
|
||||
"date",
|
||||
|
|
Loading…
Reference in a new issue