From: Sebastian Harl Date: Tue, 22 Apr 2014 20:06:47 +0000 (+0200) Subject: store: Free old attribute values before storing an updated value. X-Git-Tag: sysdb-0.1.0~96 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=47fb45de1391e48685a7188914efe987e90f5988;p=sysdb.git store: Free old attribute values before storing an updated value. --- diff --git a/src/core/store.c b/src/core/store.c index dace58f..6d9c971 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -481,6 +481,7 @@ sdb_store_attribute(const char *hostname, if (status >= 0) { assert(updated_attr); + sdb_data_free_datum(&SDB_ATTR(updated_attr)->value); if (sdb_data_copy(&SDB_ATTR(updated_attr)->value, value)) { sdb_object_deref(SDB_OBJ(updated_attr)); status = -1;