Revision: 5074 http://geany.svn.sourceforge.net/geany/?rev=5074&view=rev Author: ntrel Date: 2010-06-30 11:49:05 +0000 (Wed, 30 Jun 2010)
Log Message: ----------- Use g_free instead of free (patch by Daniel Marjam?\195?\164ki, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/get.c trunk/tagmanager/tm_workspace.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-06-30 11:34:11 UTC (rev 5073) +++ trunk/ChangeLog 2010-06-30 11:49:05 UTC (rev 5074) @@ -3,6 +3,8 @@ * src/highlighting.c: Re-enable fold.comment for the C lexer - it was disabled to prevent //{ explicit folding, but that also disables stream comments /* */. + * tagmanager/tm_workspace.c, tagmanager/get.c: + Use g_free instead of free (patch by Daniel Marjamäki, thanks).
2010-06-29 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/tagmanager/get.c =================================================================== --- trunk/tagmanager/get.c 2010-06-30 11:34:11 UTC (rev 5073) +++ trunk/tagmanager/get.c 2010-06-30 11:49:05 UTC (rev 5074) @@ -710,7 +710,7 @@ memcpy(result, &File.fpBuffer[getBufPos()], pos2 - pos1 + 1); result[pos2-pos1+1] = '\0'; arglist = getArglistFromStr(result, tokenName); - free(result); + g_free(result); } } setBufPos (bufferOriginalPosition); @@ -737,8 +737,8 @@ { result[pos2-pos1+1] = '\0'; arglist = getArglistFromStr(result, tokenName); - free(result); } + g_free(result); } fsetpos(File.fp, &originalPosition); return arglist;
Modified: trunk/tagmanager/tm_workspace.c =================================================================== --- trunk/tagmanager/tm_workspace.c 2010-06-30 11:34:11 UTC (rev 5073) +++ trunk/tagmanager/tm_workspace.c 2010-06-30 11:49:05 UTC (rev 5074) @@ -226,7 +226,7 @@ size_t size;
size = fwrite(str, str_len, 1, fp); - free(str); + g_free(str); node = g_list_next (node); } } @@ -302,6 +302,7 @@ { int dirty_len = strlen(includes[idx_inc]); char *clean_path = g_malloc(dirty_len - 1); + strncpy(clean_path, includes[idx_inc] + 1, dirty_len - 1); clean_path[dirty_len - 2] = 0;
@@ -331,7 +332,7 @@ } } globfree(&globbuf); - free(clean_path); + g_free(clean_path); } else #endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.