mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-05 04:56:10 +00:00
Fix filled buffer memory leak
This commit is contained in:
parent
023f4c5bb4
commit
e34bfcb184
@ -425,9 +425,10 @@ static int cmd_cmp(void *data, const char *input) {
|
||||
memcpy (filled, input, strlen (input) + 1);
|
||||
|
||||
buf = (ut8*)malloc (strlen (input) + 1);
|
||||
if (!buf)
|
||||
if (!buf) {
|
||||
free(filled);
|
||||
return false;
|
||||
|
||||
}
|
||||
ret = r_hex_bin2str (core->block, strlen (input) / 2, (char *)buf);
|
||||
|
||||
for (i = 0; i < ret * 2; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user