From 47fb45de1391e48685a7188914efe987e90f5988 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 22 Apr 2014 22:06:47 +0200 Subject: [PATCH] store: Free old attribute values before storing an updated value. --- src/core/store.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2