[gnome-utils] 2009-04-26 Dennis Cranston <dennis_cranston yahoo com>
- From: Dennis Cranston <dcransto src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-utils] 2009-04-26 Dennis Cranston <dennis_cranston yahoo com>
- Date: Mon, 27 Apr 2009 01:33:37 -0400 (EDT)
commit 51bf5666cd04acfa3a0afec5fa53dbb6b2f09acd
Author: Dennis Cranston <Dennis_Cranston yahoo com>
Date: Sun Apr 26 22:27:00 2009 -0700
2009-04-26 Dennis Cranston <dennis_cranston yahoo com>
* gsearchtool-support.c (compare_regex): Fix memory leak.
Bug 579461.
---
gsearchtool/ChangeLog | 5 +++++
gsearchtool/gsearchtool-support.c | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gsearchtool/ChangeLog b/gsearchtool/ChangeLog
index 8fd6d42..28b3fbe 100644
--- a/gsearchtool/ChangeLog
+++ b/gsearchtool/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-26 Dennis Cranston <dennis_cranston yahoo com>
+
+ * gsearchtool-support.c (compare_regex): Fix memory leak.
+ Bug 579461.
+
2009-03-29 Dennis Cranston <dennis_cranston yahoo com>
* gsearchtool.c (setup_case_insensitive_arguments): If grep
diff --git a/gsearchtool/gsearchtool-support.c b/gsearchtool/gsearchtool-support.c
index bbf27fb..dcc8d2a 100644
--- a/gsearchtool/gsearchtool-support.c
+++ b/gsearchtool/gsearchtool-support.c
@@ -500,9 +500,11 @@ compare_regex (const gchar * regex,
if (!regcomp (®exec_pattern, regex, REG_EXTENDED|REG_NOSUB)) {
if (regexec (®exec_pattern, string, 0, 0, 0) != REG_NOMATCH) {
+ regfree (®exec_pattern);
return TRUE;
}
}
+ regfree (®exec_pattern);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]