changeset 4869:e6c7d67c1f3a

[gaim-migrate @ 5199] Ari Pollak (sourceo) writes: "This fixes a small memleak in prefs.c." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 22 Mar 2003 23:28:49 +0000
parents 4a689f8d3d2f
children 773135edda4a
files src/prefs.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/prefs.c	Sat Mar 22 23:19:34 2003 +0000
+++ b/src/prefs.c	Sat Mar 22 23:28:49 2003 +0000
@@ -2210,6 +2210,7 @@
 {
 	GError *error = NULL;
 	char **argv; 
+	gchar *progname;
 	gboolean is_valid = FALSE;
 
 	if (program == NULL || *program == '\0') {
@@ -2226,10 +2227,12 @@
 		return FALSE;
 	}
 
-	is_valid = g_find_program_in_path(argv[0]) != NULL;
+	progname = g_find_program_in_path(argv[0]);
+	is_valid = (progname != NULL);
 
 	g_strfreev(argv);
-
+	g_free(progname);
+	
 	return is_valid;
 }