From: Sebastian Harl Date: Sat, 17 Jan 2015 00:19:47 +0000 (+0100) Subject: frontend/store: Free dynamically allocated memory of attribute values. X-Git-Tag: sysdb-0.7.0~53 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=bb68df0b78fdb0c16d12cb7df00bc597920c7cfc frontend/store: Free dynamically allocated memory of attribute values. --- diff --git a/src/frontend/store.c b/src/frontend/store.c index cb87ed4..ff56316 100644 --- a/src/frontend/store.c +++ b/src/frontend/store.c @@ -127,12 +127,15 @@ sdb_fe_store(sdb_conn_t *conn) } if (type & SDB_ATTRIBUTE) { sdb_proto_attribute_t attr; + int status; if (sdb_proto_unmarshal_attribute(buf, len, &attr) < 0) { sdb_strbuf_sprintf(conn->errbuf, "STORE: Failed to unmarshal attribute object"); return -1; } - return sdb_fe_store_attribute(conn, &attr); + status = sdb_fe_store_attribute(conn, &attr); + sdb_data_free_datum(&attr.value); + return status; } sdb_log(SDB_LOG_ERR, "frontend: Invalid object type %d for "