From cb09690008c468d5bb8fb9b27b761dccf126cfaa Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Wed, 16 Aug 2000 19:24:30 +0000 Subject: More leak fixes svn path=/trunk/; revision=4857 --- camel/ChangeLog | 4 ++++ camel/camel-internet-address.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index cf6aa6ed6e..0572761257 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,9 @@ 2000-08-16 Peter Williams + * camel-internet-address.c (internet_encode): Fix a leak when + name = "". It's a single-byte leak, but it's the little things + that count. + * camel-object.c (camel_type_lock_up): Don't leave the type system locked when a bad unlock happens. diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c index 0e68f718c2..98b78dfdf9 100644 --- a/camel/camel-internet-address.c +++ b/camel/camel-internet-address.c @@ -116,8 +116,9 @@ static char * internet_encode (CamelAddress *a) if (i!=0) g_string_append(out, ", "); - if (name && *name) { - g_string_sprintfa(out, "%s <%s>", name, addr->address); + if (name) { + if (*name) + g_string_sprintfa(out, "%s <%s>", name, addr->address); g_free(name); } else g_string_sprintfa(out, "%s", addr->address); -- cgit v1.2.3