From: Austin Clements Date: Sun, 29 Jan 2012 05:50:08 +0000 (-0500) Subject: lib: Don't delete uninitialized pointers X-Git-Tag: debian/0.12_rc1-1~129 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=a8ee1c75c348f41d88398fc394812e66e8e8b72e;hp=a8ee1c75c348f41d88398fc394812e66e8e8b72e lib: Don't delete uninitialized pointers In the error-handling paths of notmuch_database_open, we call notmuch_database_close, which "delete"s several objects referenced by the notmuch_database_t object. However, some of these pointers may be uninitialized, resulting in undefined behavior. Hence, allocate the notmuch_database_t with talloc_zero to make sure these pointers are NULL so that "delete"ing them is harmless. ---