diff options
-rw-r--r-- | camel/ChangeLog | 4 | ||||
-rw-r--r-- | 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 <peterw@helixcode.com> + * 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); |