mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Memory leak fix proposal in syscmd_join ##util (#16012)
This commit is contained in:
parent
17026c8c62
commit
e71cd20268
@ -409,6 +409,7 @@ R_API char *r_syscmd_join(const char *file1, const char *file2) {
|
||||
if (end) {
|
||||
*end = '\0';
|
||||
} else {
|
||||
free (field);
|
||||
continue;
|
||||
}
|
||||
r_list_foreach (list2, iter2, str2) {
|
||||
@ -421,6 +422,7 @@ R_API char *r_syscmd_join(const char *file1, const char *file2) {
|
||||
r_list_append (list, out);
|
||||
}
|
||||
}
|
||||
free (field);
|
||||
}
|
||||
data = r_list_to_str (list, '\n');
|
||||
r_list_free (list);
|
||||
|
Loading…
Reference in New Issue
Block a user