You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In function run_tests in ipsec_perf.c any allocated avg_times buffers probably should be free'd before free'ing variant_list. This is a moot point because _exit() is being called afterwards anyhow, but it's nice to clean up correctly to clean up static analysis warnings :-)
2230 for (variant = 0, variant_ptr = variant_list;
2231 variant < total_variants;
2232 variant++, variant_ptr++) {
CID 99591 (#4 of 4): Resource leak (RESOURCE_LEAK)
41. alloc_fn: Storage is returned from allocation function malloc.
42. var_assign: Assigning: variant_ptr->avg_times = storage returned from malloc(at_size).
43. var_assign: Assigning: variant_list->avg_times = variant_ptr->avg_times.
2233 variant_ptr->avg_times = (uint64_t *) malloc(at_size);
44. Condition !variant_ptr->avg_times, taking false branch.
47. Condition !variant_ptr->avg_times, taking false branch.
2234 if (!variant_ptr->avg_times) {
2235 fprintf(stderr, "Cannot allocate memory\n");
2236 goto exit_failure;
2237 }
In function run_tests in ipsec_perf.c any allocated avg_times buffers probably should be free'd before free'ing variant_list. This is a moot point because _exit() is being called afterwards anyhow, but it's nice to clean up correctly to clean up static analysis warnings :-)
and the free'ing:
The text was updated successfully, but these errors were encountered: