[gtk+/gtk-2-24] iconfactory: Initialize varibale to NULL in failure path



commit b7ab0ed129026207b37717d565feb932a6219612
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 9 23:09:07 2010 +0200

    iconfactory: Initialize varibale to NULL in failure path
    
    Otherwise we use random memory and that is not good.

 gtk/gtkiconfactory.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index c4b6c9c..846714f 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -1463,6 +1463,8 @@ render_icon_name_pixbuf (GtkIconSource    *icon_source,
           tmp_pixbuf = gtk_icon_info_load_icon (info, &error);
           gtk_icon_info_free (info);
         }
+      else
+        tmp_pixbuf = NULL;
     }
   else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]