[Commits] [SCM] claws branch, master, updated. 3.16.0-246-g5513d4e

ticho at claws-mail.org ticho at claws-mail.org
Sun Jul 22 21:28:46 CEST 2018


The branch, master has been updated
       via  5513d4e1ce94cb67764588a0d2d9769a3cd3d758 (commit)
      from  99c3a400fcec1e232b2807e98d896e543b682e2c (commit)

Summary of changes:
 src/advsearch.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 5513d4e1ce94cb67764588a0d2d9769a3cd3d758
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Jul 22 21:28:32 2018 +0200

    Fixed a small memory leak in advsearch_expand_search_string().

diff --git a/src/advsearch.c b/src/advsearch.c
index 94e010e..3abbeaa 100644
--- a/src/advsearch.c
+++ b/src/advsearch.c
@@ -311,9 +311,12 @@ gchar *advsearch_expand_search_string(const gchar *search_string)
 
 	/* return search string if no match is found to allow
 	   all available filtering expressions in advanced search */
-	if (matcherstr->len > 0) returnstr = matcherstr->str;
-	else returnstr = g_strdup(search_string);
-	g_string_free(matcherstr, FALSE);
+	if (matcherstr->len > 0) {
+		returnstr = g_string_free(matcherstr, FALSE);
+	} else {
+		returnstr = g_strdup(search_string);
+		g_string_free(matcherstr, TRUE);
+	}
 	return returnstr;
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list