I was playing a bit with adding talloc leak debugging to notmuch (since it seems to be essentially free, performance-wise). I got a bit discouraged about modifying the argument handling in notmuch.c, so I hacked it in via an environment variable.