diff options
Diffstat (limited to 'src/analysis/db/items')
-rw-r--r-- | src/analysis/db/items/comment.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c index b879d08..7eb7906 100644 --- a/src/analysis/db/items/comment.c +++ b/src/analysis/db/items/comment.c @@ -301,11 +301,10 @@ static void g_db_comment_dispose(GDbComment *comment) { size_t i; /* Boucle de parcours */ - for (i = 0; i < comment->old_count; i++) - g_object_unref(G_OBJECT(comment->old_inlined[i])); + g_clear_object(&comment->previous); - if (comment->old_inlined != NULL) - free(comment->old_inlined); + for (i = 0; i < comment->old_count; i++) + g_clear_object(&comment->old_inlined[i]); G_OBJECT_CLASS(g_db_comment_parent_class)->dispose(G_OBJECT(comment)); @@ -346,6 +345,9 @@ static void g_db_comment_finalize(GDbComment *comment) unlock_flat_array(&comment->text); + if (comment->old_inlined != NULL) + free(comment->old_inlined); + G_OBJECT_CLASS(g_db_comment_parent_class)->finalize(G_OBJECT(comment)); } |