Remove NULL checks when calling g_free() (patch Erik de Castro

Lopo, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5221 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-09-09 17:21:05 +00:00
parent 4360b71fc7
commit ca74dd214c
4 changed files with 7 additions and 8 deletions

View File

@ -14,6 +14,9 @@
* doc/geany.txt, doc/geany.html:
Mention the filetype wordchars setting can be overridden by the
whitespace_chars filetypes.common setting.
* src/highlighting.c, src/encodings.c, tagmanager/tm_file_entry.c:
Remove NULL checks when calling g_free() (patch Erik de Castro
Lopo, thanks).
2010-09-09 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

View File

@ -488,8 +488,7 @@ gchar *encodings_convert_to_utf8_from_charset(const gchar *buffer, gsize size,
geany_debug("Couldn't convert from %s to UTF-8.", charset);
utf8_content = NULL;
if (converted_contents != NULL)
g_free(converted_contents);
g_free(converted_contents);
}
else
{

View File

@ -436,8 +436,7 @@ void highlighting_free_styles()
if (named_style_hash)
g_hash_table_destroy(named_style_hash);
if (style_sets)
g_free(style_sets);
g_free(style_sets);
}

View File

@ -238,8 +238,7 @@ TMFileEntry *tm_file_entry_new(const char *path, TMFileEntry *parent
}
closedir(dir);
entry->children = g_slist_sort(entry->children, (GCompareFunc) tm_file_entry_compare);
if (entries)
g_free(entries);
g_free(entries);
break;
}
return entry;
@ -257,8 +256,7 @@ void tm_file_entry_free(gpointer entry)
tm_file_entry_free(tmp->data);
g_slist_free(file_entry->children);
}
if (file_entry->version)
g_free(file_entry->version);
g_free(file_entry->version);
g_free(file_entry->path);
FILE_FREE(file_entry);
}