From: Sebastian Harl Date: Thu, 3 Jul 2014 16:37:17 +0000 (+0200) Subject: store: Don't destroy an attribute if data_copy() failed. X-Git-Tag: sysdb-0.3.0~90 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c4527c3d53a349331fbcbe3bea3ad673b57889f;p=sysdb.git store: Don't destroy an attribute if data_copy() failed. Else, the store would reference invalid memory. --- diff --git a/src/core/store.c b/src/core/store.c index 866661a..3885e50 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -534,7 +534,6 @@ sdb_store_attribute(const char *hostname, assert(updated_attr); sdb_data_free_datum(&ATTR(updated_attr)->value); if (sdb_data_copy(&ATTR(updated_attr)->value, value)) { - sdb_object_deref(SDB_OBJ(updated_attr)); status = -1; } }