Fix possible leak of list after each loop iteration ##util

This commit is contained in:
Paul B Mahol 2022-08-04 18:13:50 +02:00 committed by pancake
parent 802eb32aa2
commit 2853a125e4

View File

@ -1092,6 +1092,7 @@ R_API bool r_table_query(RTable *t, const char *q) {
const char *operation = r_list_get_n (q, 1);
const char *operand = r_list_get_n (q, 2);
if (__table_special (t, columnName)) {
r_list_free (q);
continue;
}
int col = r_table_column_nth (t, columnName);
@ -1105,6 +1106,7 @@ R_API bool r_table_query(RTable *t, const char *q) {
}
}
if (!operation) {
r_list_free (q);
break;
}
if (!strcmp (operation, "sort")) {