[geany/geany-plugins] 61803c: scope - fixed useless memory deallocation

Dimitar Zhekov git-noreply at xxxxx
Wed Apr 17 18:45:47 UTC 2013


Branch:      refs/heads/master
Author:      Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer:   Dimitar Zhekov <dimitar.zhekov at gmail.com>
Date:        Wed, 17 Apr 2013 18:45:47 UTC
Commit:      61803c65f0a7633ba61b745dc9183b7cbe0d5f7e
             https://github.com/geany/geany-plugins/commit/61803c65f0a7633ba61b745dc9183b7cbe0d5f7e

Log Message:
-----------
scope - fixed useless memory deallocation


Modified Paths:
--------------
    scope/src/inspect.c

Modified: scope/src/inspect.c
9 files changed, 3 insertions(+), 6 deletions(-)
===================================================================
@@ -81,16 +81,13 @@ static gboolean inspect_find_recursive(GtkTreeIter *iter, gint i, const char *ke
 		}
 		else
 		{
-			char *var1;
+			const char *var1;
 			size_t len;
-			gboolean match;
 
 			scp_tree_store_get(store, iter, INSPECT_VAR1, &var1, -1);
 			len = var1 ? strlen(var1) : 0;
-			match = var1 && !strncmp(key, var1, len);
-			g_free(var1);
 
-			if (match)
+			if (var1 && !strncmp(key, var1, len))
 			{
 				if (key[len] == '\0')
 					return TRUE;
@@ -143,8 +140,8 @@ static gint inspect_get_scid(GtkTreeIter *iter)
 static void inspect_expand(GtkTreeIter *iter)
 {
 	const char *var1;
-	char *s;
 	gint scid, start, count, numchild;
+	char *s;
 
 	scid = inspect_get_scid(iter);
 	scp_tree_store_get(store, iter, INSPECT_VAR1, &var1, INSPECT_START, &start,



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list