[balsa/gtk3] Plug memory leak
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Plug memory leak
- Date: Mon, 16 Jul 2012 02:58:39 +0000 (UTC)
commit 354726868538f87bff0922cb013a1b651c021441
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 15 22:28:31 2012 -0400
Plug memory leak
* libbalsa/address.c (libbalsa_address_extract_name): plug mem
leak.
ChangeLog | 5 +++++
libbalsa/address.c | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cd86a0e..321f39f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-15 Peter Bloomfield
+ * libbalsa/address.c (libbalsa_address_extract_name): plug mem
+ leak.
+
+2012-07-15 Peter Bloomfield
+
* libbalsa/address-book-ldif.c
(libbalsa_address_book_ldif_save_address): fseek before writing
to stream.
diff --git a/libbalsa/address.c b/libbalsa/address.c
index 2ecd6ca..3a601e5 100644
--- a/libbalsa/address.c
+++ b/libbalsa/address.c
@@ -138,8 +138,11 @@ libbalsa_address_extract_name(const gchar * string, gchar ** last_name,
while (fld[cpt] != NULL)
cpt++;
- if (cpt == 0) /* insane empty name */
- return NULL;
+ if (cpt == 0) {
+ /* insane empty name */
+ g_strfreev(fld);
+ return NULL;
+ }
if (fld[LAST] && *fld[LAST])
*last_name = g_strdup(fld[LAST]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]