From 87111f268f13f56dc9cb57ee450fb956d25e9a82 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 9 Oct 2016 12:58:44 +0200 Subject: [PATCH] Ferite: Fix a memory leak --- ctags/parsers/c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctags/parsers/c.c b/ctags/parsers/c.c index 7035cc1b5..428453f9f 100644 --- a/ctags/parsers/c.c +++ b/ctags/parsers/c.c @@ -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); -- 2.11.4.GIT