From 8480a0a00370f997a29ebf98560a799ece43d3f4 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Nov 2010 03:36:13 -0800 Subject: [PATCH] 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. --- lib/filenames.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/filenames.c b/lib/filenames.c index 50e14354..f078c955 100644 --- a/lib/filenames.c +++ b/lib/filenames.c @@ -79,6 +79,7 @@ _notmuch_filenames_create (const void *ctx, return NULL; filenames->iterator = list->head; + (void) talloc_reference (filenames, list); return filenames; } -- 2.26.2