[geany/geany] 87111f: Ferite: Fix a memory leak

Colomban Wendling git-noreply at geany.org
Sun Oct 9 10:58:44 UTC 2016


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 09 Oct 2016 10:58:44 UTC
Commit:      87111f268f13f56dc9cb57ee450fb956d25e9a82
             https://github.com/geany/geany/commit/87111f268f13f56dc9cb57ee450fb956d25e9a82

Log Message:
-----------
Ferite: Fix a memory leak


Modified Paths:
--------------
    ctags/parsers/c.c

Modified: ctags/parsers/c.c
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -1440,7 +1440,7 @@ static void makeTag (const tokenInfo *const token,
 	if (isType (token, TOKEN_NAME)  &&  vStringLength (token->name) > 0  /* &&
 		includeTag (type, isFileScope) */)
 	{
-		vString *scope = vStringNew ();
+		vString *scope;
 		tagEntryInfo e;
 
 		/* take only functions which are introduced by "function ..." */
@@ -1456,6 +1456,7 @@ static void makeTag (const tokenInfo *const token,
 		e.filePosition	= token->filePosition;
 		e.isFileScope = isFileScope;
 
+		scope = vStringNew ();
 		findScopeHierarchy (scope, st);
 		addOtherFields (&e, type, token, st, scope);
 



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


More information about the Commits mailing list