[bijiben] note-id: Fix memory leak
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] note-id: Fix memory leak
- Date: Mon, 16 Apr 2018 20:52:14 +0000 (UTC)
commit 3853bc82c39e5331bc963f3664a679c23f6e3708
Author: Isaque Galdino <igaldino gmail com>
Date: Mon Apr 16 17:51:23 2018 -0300
note-id: Fix memory leak
src/libbiji/biji-note-id.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libbiji/biji-note-id.c b/src/libbiji/biji-note-id.c
index b056af6..f495c50 100644
--- a/src/libbiji/biji-note-id.c
+++ b/src/libbiji/biji-note-id.c
@@ -35,7 +35,7 @@ struct _BijiNoteID
GObject parent_instance;
/* InfoSet */
- const gchar *path;
+ gchar *path;
gchar *title;
gchar *content;
gint64 mtime;
@@ -63,7 +63,9 @@ biji_note_id_finalize (GObject *object)
{
BijiNoteID *self = BIJI_NOTE_ID (object);
+ g_free (self->path);
g_free (self->title);
+ g_free (self->content);
G_OBJECT_CLASS (biji_note_id_parent_class)->finalize (object);
}
@@ -99,7 +101,7 @@ biji_note_id_set_property (GObject *object,
self->mtime = g_value_get_int64 (value);
break;
case PROP_CONTENT:
- self->content = g_strdup (g_value_get_string (value));
+ biji_note_id_set_content (self, g_value_get_string (value));
g_object_notify_by_pspec (object, properties[PROP_CONTENT]);
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]