mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 01:14:53 +01:00
Fix error reporting in notmuch_database_find_message_by_filename
Formerly it was possible for *message_ret to be left uninitialized. The documentation however clearly states that "[o]n any failure or when the message is not found, this function initializes '*message' to NULL". Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This commit is contained in:
parent
622d2f6128
commit
ea54c4fdc7
1 changed files with 3 additions and 0 deletions
|
@ -1825,6 +1825,9 @@ notmuch_database_find_message_by_filename (notmuch_database_t *notmuch,
|
|||
if (message_ret == NULL)
|
||||
return NOTMUCH_STATUS_NULL_POINTER;
|
||||
|
||||
/* return NULL on any failure */
|
||||
*message_ret = NULL;
|
||||
|
||||
local = talloc_new (notmuch);
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue