mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
Fix a double-free bug that was causing preference corruption and crashes.
This commit is contained in:
parent
0a77d36380
commit
f80ab0832f
1 changed files with 2 additions and 2 deletions
|
@ -432,11 +432,11 @@ writefile_traverse(gpointer key, gpointer value, gpointer data) {
|
|||
*ptr = (*ptr) + 2;
|
||||
|
||||
bkey->type = TYPE_STR;
|
||||
bkey->val.s.s = key;
|
||||
bkey->val.s.s = g_strdup(key);
|
||||
bkey->val.s.i = strlen(key);
|
||||
|
||||
bval->type = TYPE_STR;
|
||||
bval->val.s.s = value;
|
||||
bval->val.s.s = g_strdup(value);
|
||||
bval->val.s.i = strlen(value);
|
||||
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue