Memory leak fix proposal in syscmd_join ##util (#16012)

This commit is contained in:
David CARLIER 2020-02-20 20:02:43 +00:00 committed by GitHub
parent 17026c8c62
commit e71cd20268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);