From: Carl Worth Date: Thu, 11 Nov 2010 11:36:13 +0000 (-0800) Subject: notmuch_filenames_create: Take a reference to underlying filename list X-Git-Tag: 0.5~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8480a0a00370f997a29ebf98560a799ece43d3f4;p=notmuch.git 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. --- 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; }