[evolution-data-server] e_name_western_reorder_asshole: Fix possible memory leak
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] e_name_western_reorder_asshole: Fix possible memory leak
- Date: Mon, 6 Jun 2011 12:05:22 +0000 (UTC)
commit 5f75312bfd570a78575e8332f5f621e8c4b023d9
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 eb19e3d..8a1fdd6 100644
--- a/addressbook/libebook/e-name-western.c
+++ b/addressbook/libebook/e-name-western.c
@@ -649,8 +649,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]