Fix a memory leak based on input by Daniel Marjamäki. Thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5145 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Frank Lanitz 2010-08-12 05:49:07 +00:00
parent b84b536f54
commit 2364a0d0a3
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-08-12 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* src/search.c:
Fix a memory leak based on input by Daniel Marjamäki. Thanks.
2010-08-11 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2010-08-11 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* doc/geany.txt, doc/geany.html: * doc/geany.txt, doc/geany.html:

View File

@ -1455,7 +1455,7 @@ search_find_in_files(const gchar *utf8_search_text, const gchar *dir, const gcha
if (argv == NULL) /* no files */ if (argv == NULL) /* no files */
{ {
g_strfreev(argv); g_free(search_text);
return FALSE; return FALSE;
} }
@ -1494,6 +1494,7 @@ search_find_in_files(const gchar *utf8_search_text, const gchar *dir, const gcha
utils_free_pointers(2, str, utf8_str, NULL); utils_free_pointers(2, str, utf8_str, NULL);
ret = TRUE; ret = TRUE;
} }
g_free(search_text);
g_strfreev(argv); g_strfreev(argv);
return ret; return ret;
} }