lib/index: Fix memory leak for email addresses without names.
authorCarl Worth <cworth@cworth.org>
Tue, 1 Dec 2009 20:40:13 +0000 (12:40 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 1 Dec 2009 20:40:13 +0000 (12:40 -0800)
commite5316b320a51915fc1dbdd8724643931cd03327f
tree39b10f3b8ca51b4658141e083acf56467f9b6b2b
parent6320695223e466a285a77fe0d30fff0ff5e89172
lib/index: Fix memory leak for email addresses without names.

We carefully noted the fact that we had locally allocated the string
here, but then we neglected to free it. Switch to talloc instead
which makes it easier to get the behavior we want. It's simpler since
we can just call talloc_free unconditionally, without having to track
the state of whether we allocated the storage for name or not.
lib/index.cc