Revision: 5778 http://geany.svn.sourceforge.net/geany/?rev=5778&view=rev Author: colombanw Date: 2011-05-09 17:35:56 +0000 (Mon, 09 May 2011)
Log Message: ----------- Plug a memory leak in the C tag parser
Modified Paths: -------------- branches/0.20.1/ChangeLog branches/0.20.1/tagmanager/c.c
Modified: branches/0.20.1/ChangeLog =================================================================== --- branches/0.20.1/ChangeLog 2011-05-09 17:35:37 UTC (rev 5777) +++ branches/0.20.1/ChangeLog 2011-05-09 17:35:56 UTC (rev 5778) @@ -2,6 +2,8 @@
* src/sidebar.c: Don't remove and add the symbols tree view if we re-add the same one. + * tagmanager/c.c: + Plug a memory leak.
2011-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/0.20.1/tagmanager/c.c =================================================================== --- branches/0.20.1/tagmanager/c.c 2011-05-09 17:35:37 UTC (rev 5777) +++ branches/0.20.1/tagmanager/c.c 2011-05-09 17:35:56 UTC (rev 5778) @@ -2913,6 +2913,7 @@ else if (isContextualStatement (st)) { tokenInfo *name_token = (tokenInfo *)prev; + boolean free_name_token = FALSE;
if (isType (name_token, TOKEN_NAME)) { @@ -2949,6 +2950,7 @@ char buffer[64];
name_token = newToken (); + free_name_token = TRUE; copyToken (name_token, contextual_token);
sprintf(buffer, "anon_%s_%d", name_token->name->buffer, contextual_fake_count++); @@ -2967,6 +2969,8 @@ } } qualifyBlockTag (st, name_token); + if (free_name_token) + deleteToken (name_token); } break; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.