Fix memleak in rz_assembly_of_hex_handler()

This commit is contained in:
Pavel I 2023-08-14 02:41:15 +04:00 committed by Anton Kochkov
parent 6c20796600
commit ee1f1a4332

View file

@ -2805,8 +2805,8 @@ RZ_IPI RzCmdStatus rz_assembly_of_hex_handler(RzCore *core, int argc, const char
return RZ_CMD_STATUS_ERROR;
}
char *buf = rz_core_assembly_of_hex(core, hex, len);
free(hex);
if (!buf) {
free(hex);
return RZ_CMD_STATUS_ERROR;
}
rz_cons_print(buf);