Skip to content

Commit

Permalink
ibacm: acme.c fix memory leak for function 'resolve'
Browse files Browse the repository at this point in the history
$ valgrind ib_acme -d 172.31.0.111 -s 172.31.0.110
<snip>
 29 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x4C30F0B: malloc (vg_replace_malloc.c:307)
    by 0x10DFAF: parse (parse.c:106)
    by 0x10C1FD: resolve (acme.c:753)
    by 0x109E4A: query_svcs (acme.c:997)
    by 0x109E4A: main (acme.c:1113)
<snip>

Signed-off-by: Honggang Li <[email protected]>
  • Loading branch information
Honggang-LI committed Dec 15, 2020
1 parent a6f75fa commit 285869d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ibacm/src/acme.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ static int resolve(char *svc)
} while (src_addr);
}

free(src_list);
free(dest_list);

return ret;
Expand Down

0 comments on commit 285869d

Please sign in to comment.