pidgin: 9630232e: GError needs to be initialized to NULL. ...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Sep 3 16:41:49 EDT 2009


-----------------------------------------------------------------
Revision: 9630232e95bdc3841b996c1e68eb8d5b75c1dff1
Ancestor: 9507787d115ccefd6abdd7926743b7f7f80f31c9
Author: markdoliner at pidgin.im
Date: 2009-09-03T20:38:12
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/9630232e95bdc3841b996c1e68eb8d5b75c1dff1

Modified files:
        pidgin/gtkutils.c

ChangeLog: 

GError needs to be initialized to NULL.  I can't help but think that this
is a poor API.  It's bug prone.

-------------- next part --------------
============================================================
--- pidgin/gtkutils.c	03954ae90744b694e40bdf8e4aa91a187bdafd44
+++ pidgin/gtkutils.c	9f0e3d049b65a569a34d18765ed6f3a11d3c07f1
@@ -3746,7 +3746,7 @@ savefile_write_cb(gpointer user_data, ch
 	char *temp_file = user_data;
 	gchar *contents;
 	gsize length;
-	GError *error;
+	GError *error = NULL;
 
 	if (!g_file_get_contents(temp_file, &contents, &length, &error)) {
 		purple_debug_error("gtkutils", "Unable to read contents of %s: %s\n",


More information about the Commits mailing list