Use g_free instead of free (patch by Daniel Marjamäki, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5074 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-06-30 11:49:05 +00:00
parent 95c8f687fc
commit 293ba9bee7
3 changed files with 7 additions and 4 deletions

View File

@ -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>

View File

@ -710,7 +710,7 @@ extern char *getArglistFromBufferPos(int startPosition, const char *tokenName)
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 @@ extern char *getArglistFromFilePos(fpos_t startPosition, const char *tokenName)
{
result[pos2-pos1+1] = '\0';
arglist = getArglistFromStr(result, tokenName);
free(result);
}
g_free(result);
}
fsetpos(File.fp, &originalPosition);
return arglist;

View File

@ -226,7 +226,7 @@ static void write_includes_file(FILE *fp, GList *includes_files)
size_t size;
size = fwrite(str, str_len, 1, fp);
free(str);
g_free(str);
node = g_list_next (node);
}
}
@ -302,6 +302,7 @@ gboolean tm_workspace_create_global_tags(const char *config_dir, const char *pre
{
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 @@ gboolean tm_workspace_create_global_tags(const char *config_dir, const char *pre
}
}
globfree(&globbuf);
free(clean_path);
g_free(clean_path);
}
else
#endif