From e80c45038a6ff9ab81be7ae7283b5ff3261f17c1 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Fri, 10 May 2024 19:47:48 +0800 Subject: [PATCH] Fix hexagon double free under `-q` This is a cherry-pick of rizinorg/rz-hexagon@d24f455204290a4f7bf40d93ab1194a4523fc92f done by hand. --- librz/arch/p/asm/asm_hexagon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librz/arch/p/asm/asm_hexagon.c b/librz/arch/p/asm/asm_hexagon.c index 9567f70d013..91a373a4feb 100644 --- a/librz/arch/p/asm/asm_hexagon.c +++ b/librz/arch/p/asm/asm_hexagon.c @@ -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;