Skip to content

Commit

Permalink
example: simple_pipeline: fix memory leaks
Browse files Browse the repository at this point in the history
Configured with Asan, memory leaks detected. Free memory allocated by
malloc.

Signed-off-by: Fan Hong <fan.hong@arm.com>
  • Loading branch information
FanHong674 committed Dec 5, 2023
1 parent 9068dbd commit ba0df2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions example/simple_pipeline/odp_simple_pipeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,9 @@ int main(int argc, char **argv)

odph_thread_join(thr_tbl, num_threads);

free(global->appl.if_names);
free(global->appl.if_str);

if (odp_pktio_close(global->if0)) {
printf("Error: failed to close interface %s\n", argv[1]);
exit(EXIT_FAILURE);
Expand Down

0 comments on commit ba0df2c

Please sign in to comment.