Revision: 4986 http://geany.svn.sourceforge.net/geany/?rev=4986&view=rev Author: eht16 Date: 2010-06-03 11:28:44 +0000 (Thu, 03 Jun 2010)
Log Message: ----------- Fix not closed FILE pointer on early exit (patch by Daniel Marjamaki, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/tm_workspace.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-06-03 11:09:20 UTC (rev 4985) +++ trunk/ChangeLog 2010-06-03 11:28:44 UTC (rev 4986) @@ -3,6 +3,9 @@ * src/build.c: Explicitly try to localise build menu item labels with gettext to enforce getting default labels translated. + * tagmanager/tm_workspace.c: + Fix not closed FILE pointer on early exit + (patch by Daniel Marjamaki, thanks).
2010-05-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/tagmanager/tm_workspace.c =================================================================== --- trunk/tagmanager/tm_workspace.c 2010-06-03 11:09:20 UTC (rev 4985) +++ trunk/tagmanager/tm_workspace.c 2010-06-03 11:28:44 UTC (rev 4986) @@ -147,14 +147,17 @@ TMTag *tag; gboolean format_pipe = FALSE;
+ if (NULL == theWorkspace) + return FALSE; if (NULL == (fp = g_fopen(tags_file, "r"))) return FALSE; - if (NULL == theWorkspace) - return FALSE; if (NULL == theWorkspace->global_tags) theWorkspace->global_tags = g_ptr_array_new(); if ((NULL == fgets((gchar*) buf, BUFSIZ, fp)) || ('\0' == *buf)) + { + fclose(fp); return FALSE; /* early out on error */ + } else { /* We read the first line for the format specification. */ if (buf[0] == '#' && strstr((gchar*) buf, "format=pipe") != NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.