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:
Carl Worth 2010-11-11 03:36:13 -08:00
parent 404db1de90
commit 8480a0a003

View file

@ -79,6 +79,7 @@ _notmuch_filenames_create (const void *ctx,
return NULL; return NULL;
filenames->iterator = list->head; filenames->iterator = list->head;
(void) talloc_reference (filenames, list);
return filenames; return filenames;
} }