Skip to content

Commit

Permalink
NA: fix memory leak on NA_Get_protocol_info()
Browse files Browse the repository at this point in the history
  • Loading branch information
soumagne committed Sep 1, 2023
1 parent 69711a7 commit 7c8254e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/na/na.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,13 @@ NA_Get_protocol_info(

*na_protocol_info_p = na_protocol_info;

free(class_name);
na_info_free(na_info);

return NA_SUCCESS;

error:
free(class_name);
na_info_free(na_info);
while (na_protocol_info != NULL) {
struct na_protocol_info *tmp = na_protocol_info;
Expand Down

0 comments on commit 7c8254e

Please sign in to comment.