mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
notmuch_filenames_create: Take a reference to underlying filename list
The notmuch_filenames_t object might easily outlive the original object owning the filename list. So take a talloc reference to keep things safe.
This commit is contained in:
parent
404db1de90
commit
8480a0a003
1 changed files with 1 additions and 0 deletions
|
@ -79,6 +79,7 @@ _notmuch_filenames_create (const void *ctx,
|
|||
return NULL;
|
||||
|
||||
filenames->iterator = list->head;
|
||||
(void) talloc_reference (filenames, list);
|
||||
|
||||
return filenames;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue