Commit 056ba6ad authored by Olivier Fourdan's avatar Olivier Fourdan 🛠

settings: Duplicate string gvalues

The gvalues strings were considered statics, hence not duplicated.

As the caller frees the strings after setting the gvalue, the actual
content would end up pointing at free data.

Consider string gvalues as regular strings, meaning that the given
string value is duplicated as a gvalue.
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <>
Closes: #406
parent 6637211e
Pipeline #1333 passed with stages
in 2 minutes and 44 seconds
......@@ -211,7 +211,7 @@ setStringValue (const gchar * lvalue, const gchar *value, Settings *rc)
GValue tmp_val = {0, };
g_value_init(&tmp_val, G_TYPE_STRING);
g_value_set_static_string(&tmp_val, value);
g_value_set_string(&tmp_val, value);
return setGValue (lvalue, &tmp_val, rc);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment