[gtk+/rendering-cleanup-next: 143/203] iconfactory: Initialize varibale to NULL in failure path



commit 63307ab76325204c9839c54d58988ee12ab983d6
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 21811a9..6ac498a 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]