fix utarray_free null bug

This commit is contained in:
liuwentan
2023-05-08 18:51:53 +08:00
parent f7bde76fcf
commit 4540321998
4 changed files with 49 additions and 29 deletions

View File

@@ -126,8 +126,11 @@ void ex_data_runtime_clear_row_cache(struct ex_data_runtime *ex_data_rt)
return;
}
utarray_free(ex_data_rt->cache_rows);
ex_data_rt->cache_rows = NULL;
if (ex_data_rt->cache_rows != NULL) {
utarray_free(ex_data_rt->cache_rows);
ex_data_rt->cache_rows = NULL;
}
ex_data_rt->cache_row_num = 0;
ex_data_rt->cache_size = 0;
}