[bijiben] NoteObjSetRgba : fix leak



commit 5c352ae5b5b8e0c787b7e291001e603ea543bde5
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Fri Feb 8 21:50:18 2013 +0100

    NoteObjSetRgba : fix leak

 src/libbiji/biji-note-obj.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/libbiji/biji-note-obj.c b/src/libbiji/biji-note-obj.c
index b4409d5..2267e76 100644
--- a/src/libbiji/biji-note-obj.c
+++ b/src/libbiji/biji-note-obj.c
@@ -513,16 +513,12 @@ biji_note_obj_set_rgba_internal (BijiNoteObj *n, GdkRGBA *rgba)
 
 
 void
-biji_note_obj_set_rgba(BijiNoteObj *n,GdkRGBA *rgba)
+biji_note_obj_set_rgba (BijiNoteObj *n, GdkRGBA *rgba)
 {
   if (!n->priv->color)
-  {
-    n->priv->color = g_new (GdkRGBA,1);
     biji_note_obj_set_rgba_internal (n, rgba);
-    return;
-  }
 
-  if (!gdk_rgba_equal (n->priv->color,rgba))
+  else if (!gdk_rgba_equal (n->priv->color,rgba))
   {
     gdk_rgba_free (n->priv->color);
     biji_note_obj_set_rgba_internal (n, rgba);


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