[bijiben] NoteObjSetRgba : fix leak
- From: Pierre-Yves Luyten <pyluyten src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] NoteObjSetRgba : fix leak
- Date: Fri, 8 Feb 2013 20:59:25 +0000 (UTC)
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]