diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-02 18:54:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-02 18:54:33 (GMT) |
commit | 5db9effac12d781f179e329ea138fb531a5ae2a0 (patch) | |
tree | 9420cb1fbf2ae5a47f1b4b2d09c13ca582eebf26 /src/analysis/db | |
parent | f16787410dd6eaf48df986644d0c3ac2b021748b (diff) |
Got ride of some uninitialized variable usages.
Diffstat (limited to 'src/analysis/db')
-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; |