Revision: 1939 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1939&view=re... Author: frlan Date: 2011-02-26 19:56:08 +0000 (Sat, 26 Feb 2011)
Log Message: ----------- GeanyLaTeX: Minor code update to avoid not needed malloc/free. Thanks to Colomban Wendling for the hint.
Modified Paths: -------------- trunk/geanylatex/src/templates.c
Modified: trunk/geanylatex/src/templates.c =================================================================== --- trunk/geanylatex/src/templates.c 2011-02-26 17:02:33 UTC (rev 1938) +++ trunk/geanylatex/src/templates.c 2011-02-26 19:56:08 UTC (rev 1939) @@ -39,16 +39,15 @@
static void glatex_init_cutom_template_item(gchar *file, GPtrArray *array) { - TemplateEntry *template = g_new0(TemplateEntry, 1); + TemplateEntry *template = NULL; gchar *tmp = NULL;
/* Return if its not a searched file */ if (g_str_has_suffix(file,".gtl") == FALSE) - { - g_free(template); return; - }
+ template = g_new0(TemplateEntry, 1); + template->filepath = g_strdup(file);
tmp = g_path_get_basename(file);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.