Fix hexagon double free under -q

This is a cherry-pick of rizinorg/rz-hexagon@d24f455204 done by hand.
This commit is contained in:
Khairul Azhar Kasmiran 2024-05-10 19:47:48 +08:00 committed by GitHub
parent 416fc1e13f
commit e80c45038a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,7 +129,7 @@ static bool hex_cfg_set(void *user, void *data) {
}
if (cnode) {
pnode->i_value = cnode->i_value;
pnode->value = cnode->value;
pnode->value = strdup(cnode->value);
return true;
}
return false;