[evolution-data-server/email-factory] e_name_western_reorder_asshole: Fix possible memory leak
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/email-factory] e_name_western_reorder_asshole: Fix possible memory leak
- Date: Wed, 15 Jun 2011 11:54:17 +0000 (UTC)
commit 21b86bb374b8aee2063f2e3bc80b55dfdb334ba3
Author: Christophe Dumez <christophe dumez intel com>
Date: Mon May 30 10:40:55 2011 +0300
e_name_western_reorder_asshole: Fix possible memory leak
Free 'prefix' variable on early return.
addressbook/libebook/e-name-western.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libebook/e-name-western.c b/addressbook/libebook/e-name-western.c
index 5d7c31a..3f40d6d 100644
--- a/addressbook/libebook/e-name-western.c
+++ b/addressbook/libebook/e-name-western.c
@@ -650,8 +650,10 @@ e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs)
* last name.
*/
comma = g_utf8_strchr (name->full, -1, ',');
- if (comma == NULL)
+ if (comma == NULL) {
+ g_free (prefix);
return;
+ }
p = name->full + (prefix == NULL ? 0 : strlen (prefix));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]