Kaydet (Commit) 1464cdd4 authored tarafından Enrico Tröger's avatar Enrico Tröger

Backport a fix from CTags SVN to prevent possible crashes by trying to free NULL pointers.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4835 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 2f3aa8eb
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
Use tm_source_file_set_tag_arglist() to set the argument list Use tm_source_file_set_tag_arglist() to set the argument list
field of Python class tags to the argument list of their field of Python class tags to the argument list of their
__init__() methods. __init__() methods.
Backport a fix from CTags SVN to prevent possible crashes by trying
to free NULL pointers.
2010-04-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> 2010-04-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
...@@ -355,6 +355,7 @@ static void parseFunction (const char *cp, vString *const def, ...@@ -355,6 +355,7 @@ static void parseFunction (const char *cp, vString *const def,
cp = parseIdentifier (cp, def); cp = parseIdentifier (cp, def);
arglist = parseArglist (cp); arglist = parseArglist (cp);
makeFunctionTag (def, parent, is_class_parent, arglist); makeFunctionTag (def, parent, is_class_parent, arglist);
if (arglist != NULL)
eFree (arglist); eFree (arglist);
} }
...@@ -747,6 +748,7 @@ static void findPythonTags (void) ...@@ -747,6 +748,7 @@ static void findPythonTags (void)
/* show class members or top-level script lambdas only */ /* show class members or top-level script lambdas only */
if (parent_is_class || vStringLength(parent) == 0) if (parent_is_class || vStringLength(parent) == 0)
makeFunctionTag (name, parent, parent_is_class, arglist); makeFunctionTag (name, parent, parent_is_class, arglist);
if (arglist != NULL)
eFree (arglist); eFree (arglist);
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment