projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
404db1d
)
notmuch_filenames_create: Take a reference to underlying filename list
author
Carl Worth
<cworth@cworth.org>
Thu, 11 Nov 2010 11:36:13 +0000
(
03:36
-0800)
committer
Carl Worth
<cworth@cworth.org>
Thu, 11 Nov 2010 11:40:19 +0000
(
03:40
-0800)
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
patch
|
blob
|
history
diff --git
a/lib/filenames.c
b/lib/filenames.c
index 50e1435488d04ae5c5bd59faa9f451a4dfba5d8f..f078c95579c9fabbb1c54f101de809386130f85a 100644
(file)
--- 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;
}