diff options
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/db/collection.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/analysis/db/collection.c b/src/analysis/db/collection.c index 2c6086a..0e4f756 100644 --- a/src/analysis/db/collection.c +++ b/src/analysis/db/collection.c @@ -293,12 +293,12 @@ bool _g_db_collection_unpack(GDbCollection *collec, packed_buffer *pbuf, DBActio GDbItem *item; /* Définition d'élément visé */ result = extract_packed_buffer(pbuf, &tmp32, sizeof(uint32_t), true); - if (!result) goto exit; + if (!result) goto qck_exit; *action = tmp32; result = (*action >= 0 && *action < DBA_COUNT); - if (!result) goto exit; + if (!result) goto qck_exit; item = g_object_new(collec->type, NULL); @@ -306,14 +306,16 @@ bool _g_db_collection_unpack(GDbCollection *collec, packed_buffer *pbuf, DBActio if (!result) goto exit; if (dest != NULL) + { + g_object_ref(G_OBJECT(item)); *dest = item; - else - g_object_unref(G_OBJECT(item)); + } exit: - if (!result) - g_object_unref(G_OBJECT(item)); + g_object_unref(G_OBJECT(item)); + + qck_exit: return result; |