: Fix memory leak
A message that is not in the archive (sent off-list or not yet received): 481574461.737361433821252744.JavaMail.weblogic@epmlwas02a
Hi!
Quoted 13 lines
This patch make 'found' a static array to avoid memory leaks.
Signed-off-by Cyril Hrubis <[email protected]>Signed-off-by Manjeet Pawar <[email protected]>--- utils/sctp/testlib/sctputil.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)utils/sctp/testlib/sctputil.c +0
-0
utils/sctp/testlib/sctputil.c int test_peer_addr(int sk, sctp_assoc_t asoc, sockaddr_storage_t *peers, int cou · line 376
Quoted 9 lines
utils/sctp/testlib/sctputil.c +1
-2@@ -370,8 +370,7 @@ int test_peer_addr(int sk, sctp_assoc_t asoc, sockaddr_storage_t *peers, int coustruct sockaddr *sa_addr;socklen_t addrs_size =0 ;void *addrbuf; -char *found = (char *)malloc (count); -memset (found,0 , count); +char found[count]; error =sctp_getpaddrs (sk, asoc, &addrs);if (-1 == error) {
I've added initialization to 0 to the else branch down below, since we removed the memset and pushed, thanks.
Signature · 8 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list