aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-17 03:24:30 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-17 03:24:30 +0800
commitcb09690008c468d5bb8fb9b27b761dccf126cfaa (patch)
tree3e65bdb42d13c9589b28dabd136f6bcdfe892f71
parent224c97090305d7fbe20d76d50001118a4ade959b (diff)
downloadgsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.tar
gsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.tar.gz
gsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.tar.bz2
gsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.tar.lz
gsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.tar.xz
gsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.tar.zst
gsoc2013-evolution-cb09690008c468d5bb8fb9b27b761dccf126cfaa.zip
More leak fixes
svn path=/trunk/; revision=4857
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/camel-internet-address.c5
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);