Fix load string KVP memory error.

This commit is contained in:
John Ralls
2017-08-19 14:27:33 +02:00
parent 639d52f916
commit 7e7d42847c

View File

@@ -361,9 +361,8 @@ set_string_val (gpointer pObject, gpointer pValue)
if (pInfo->value_type != KvpValue::Type::STRING || pValue == NULL)
return;
auto value = new KvpValue {static_cast<const char*> (pValue)};
auto value = new KvpValue {g_strdup(static_cast<const char*> (pValue))};
set_slot_from_value (pInfo, value);
delete value;
}
static gpointer