SF.net SVN: geany-plugins:[422] trunk/geanylatex/src

frlan at users.sourceforge.net frlan at xxxxx
Sun Feb 1 19:15:37 UTC 2009


Revision: 422
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=422&view=rev
Author:   frlan
Date:     2009-02-01 19:15:37 +0000 (Sun, 01 Feb 2009)

Log Message:
-----------
GeanyLaTeX: Fixed a possible memory leak

Modified Paths:
--------------
    trunk/geanylatex/src/bibtex.c
    trunk/geanylatex/src/geanylatex.c

Modified: trunk/geanylatex/src/bibtex.c
===================================================================
--- trunk/geanylatex/src/bibtex.c	2009-02-01 19:14:53 UTC (rev 421)
+++ trunk/geanylatex/src/bibtex.c	2009-02-01 19:15:37 UTC (rev 422)
@@ -30,6 +30,7 @@
 static int get_entry_pos(char *str)
 {
 	int i;
+
 	if(str != NULL) {
 		for (i = 0; i < N_ENTRIES; i++) {
 			if (utils_str_casecmp(str, label_entry[i]) == 0)
@@ -132,7 +133,9 @@
 			output = g_strconcat(output, label_entry_keywords[i], "= {},\n", NULL);
 		}
 	}
+
 	output = g_strconcat(output, "}\n", NULL);
 	insert_string(output);
+
 	g_free(output);
 }

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2009-02-01 19:14:53 UTC (rev 421)
+++ trunk/geanylatex/src/geanylatex.c	2009-02-01 19:15:37 UTC (rev 422)
@@ -129,6 +129,7 @@
 			GTK_ENTRY(textbox_label))), "}", NULL);
 		insert_string(label_str);
 	}
+
 	gtk_widget_destroy(dialog);
 }
 
@@ -232,6 +233,7 @@
 	/* TODO: Reset max value to stop before it's too late */
 	gint i;
 	gint count = 0;
+
 	if (categorie == -1)
 	{
 		for (i =1; tmp[i].label != NULL; i++)
@@ -809,6 +811,7 @@
 
 		output = g_string_free(code, FALSE);
 		show_output(output, NULL, encoding_int);
+		g_free(output);
 	}
 	gtk_widget_destroy(dialog);
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list