Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwife.git;a=commitdiff;h=002fb5a3f49d8c0c9939b87050368bb9466ea4c7

commit 002fb5a3f49d8c0c9939b87050368bb9466ea4c7
Author: Elentir <elen...@frugalware.org>
Date:   Sat May 22 22:40:49 2010 +0200

postconf: fix memleak

diff --git a/src/plugins/postconf.c b/src/plugins/postconf.c
index edad254..75ffbbe 100644
--- a/src/plugins/postconf.c
+++ b/src/plugins/postconf.c
@@ -508,8 +508,11 @@ void x_config(GtkWidget *button, gpointer data)
model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo));
gtk_tree_model_get (model, &iter, 0, &sDms, -1);

-                       if((sRes == NULL) || !strcmp(sRes, "") || (sDepth == 
NULL) || !strcmp(sDepth, ""))
+                       if((sRes == NULL) || !strcmp(sRes, "") || (sDepth == 
NULL) || !strcmp(sDepth, "")) {
+                               free(sRes);
+                               free(sDepth);
return;
+                       }

/* copy the currently running xorg.conf in case of Xorg crash during 
configuration */
copyfile("/etc/X11/xorg.conf", g_strdup_printf("%s/etc/X11/xorg.conf", 
TARGETDIR));
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to