talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 2d95171a97d46817e1e413b3d0a77b92072cc034
parent e72d26e92357a15163457a3f5af479ce53aaf5b3
Author: Colin Leroy <colin@colino.net>
Date:   Fri, 13 Nov 2015 13:47:48 +0100

One more leak (introduced in previous commit)

Diffstat:
Msrc/plugins/mailmbox/mmapstring.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/plugins/mailmbox/mmapstring.c b/src/plugins/mailmbox/mmapstring.c @@ -300,11 +300,15 @@ mmap_string_sized_new (size_t dfl_size) string->fd = -1; string->mmapped_size = 0; - if (mmap_string_maybe_expand (string, MAX (dfl_size, 2)) == NULL) + if (mmap_string_maybe_expand (string, MAX (dfl_size, 2)) == NULL) { + free(string); return NULL; + } - if (string->str == NULL) + if (string->str == NULL) { + free(string); return NULL; + } string->str[0] = '\0';