projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
341e2bd
)
lib: Fix use-after-free bug.
author
Carl Worth
<cworth@cworth.org>
Mon, 20 Sep 2010 22:01:52 +0000
(22:01 +0000)
committer
Carl Worth
<cworth@cworth.org>
Mon, 20 Sep 2010 22:01:52 +0000
(22:01 +0000)
Thanks to the new git-based test suite, it's easy to run the whole
test suite in valgrind, (simply "make test OPTIONS="--valgrind"), and
doing so showed this obvious use-after-free bug, (triggered by the
thread-order tests).
lib/database.cc
patch
|
blob
|
history
diff --git
a/lib/database.cc
b/lib/database.cc
index 6affc205e4e81b894443722b30f54457ff7669e3..e4ac970f4bc597398750a60ca0988e59c6c700c1 100644
(file)
--- a/
lib/database.cc
+++ b/
lib/database.cc
@@
-1300,7
+1300,7
@@
_resolve_message_id_to_thread_id (notmuch_database_t *notmuch,
talloc_free (metadata_key);
- return t
hread_id
;
+ return t
alloc_strdup (ctx, thread_id)
;
}
static notmuch_status_t