[gnac/devel] Fixed a memory leak
- From: BenoÃt Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Fixed a memory leak
- Date: Wed, 11 Jan 2012 22:49:17 +0000 (UTC)
commit db9cc25762638babb4b6234e08e869ecb4241ca1
Author: BenoÃt Dupasquier <bdupasqu src gnome org>
Date: Wed Jan 11 17:50:12 2012 +0000
Fixed a memory leak
libgnac/libgnac-output.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgnac/libgnac-output.c b/libgnac/libgnac-output.c
index 97354cd..d9deeeb 100644
--- a/libgnac/libgnac-output.c
+++ b/libgnac/libgnac-output.c
@@ -296,8 +296,11 @@ static void
libgnac_output_rename_pattern_process(LibgnacRenamePattern *pattern,
gchar **output)
{
- *output = g_regex_replace(pattern->regex, *output, -1, 0,
+ gchar *temp = g_regex_replace(pattern->regex, *output, -1, 0,
pattern->replace, 0, NULL);
+ g_free(*output);
+ *output = g_strdup(temp);
+ g_free(temp);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]