SF.net SVN: geany-plugins:[1904] trunk/geany-plugins/geanygdb/src/ gdb-ui-main.c

dmaphy at users.sourceforge.net dmaphy at xxxxx
Sun Feb 6 16:40:43 UTC 2011


Revision: 1904
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1904&view=rev
Author:   dmaphy
Date:     2011-02-06 16:40:43 +0000 (Sun, 06 Feb 2011)

Log Message:
-----------
fix Mismatching allocation and deallocation

Modified Paths:
--------------
    trunk/geany-plugins/geanygdb/src/gdb-ui-main.c

Modified: trunk/geany-plugins/geanygdb/src/gdb-ui-main.c
===================================================================
--- trunk/geany-plugins/geanygdb/src/gdb-ui-main.c	2011-02-06 16:29:30 UTC (rev 1903)
+++ trunk/geany-plugins/geanygdb/src/gdb-ui-main.c	2011-02-06 16:40:43 UTC (rev 1904)
@@ -562,8 +562,8 @@
 							{
 								gchar *base_path;
 								gchar *ldd = g_strdup_printf("ldd \"%s\"", fn);
-								FILE *fh = popen(ldd, "r");
-								if (fh)
+								FILE *ph = popen(ldd, "r");
+								if (ph)
 								{
 									ssize_t r = 0;
 									char *buf = NULL;
@@ -571,14 +571,14 @@
 									gboolean have_x = FALSE;
 									while (r >= 0)
 									{
-										r = getline(&buf, &len, fh);
+										r = getline(&buf, &len, ph);
 										if (len && buf
 												&& strstr(buf, "libX11.so"))
 										{
 											have_x = TRUE;
 										}
 									}
-									fclose(fh);
+									pclose(ph);
 									gtk_toggle_button_set_active
 											(GTK_TOGGLE_BUTTON(term_chk),
 											!have_x);
@@ -586,7 +586,7 @@
 								gdbio_load(fn);
 								if (pipe_chk_active())
 									pipe_click(pipe_chk, NULL);
-									
+
 								/* set working dir after loading */
 								base_path = g_path_get_dirname(fn);
 								gdbio_send_cmd("-environment-cd %s\n", base_path);


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