Closed mfrey closed 5 years ago
There is a potential memory leak in function ccnl_pkt_dup in ccnl-pkt.c
ccnl_pkt_dup
ccnl-pkt.c
73 struct ccnl_pkt_s * 74 ccnl_pkt_dup(struct ccnl_pkt_s *pkt){ 75 struct ccnl_pkt_s * ret = ccnl_malloc(sizeof(struct ccnl_pkt_s)); 76 if(!pkt){ 77 return NULL; 78 } 79 if(!ret){ 80 return NULL; 81 }
If the parameter pkt is null and the allocation of memory for ret was successful, the allocated memory is never freed.
pkt
ret
Description
There is a potential memory leak in function
ccnl_pkt_dup
inccnl-pkt.c
If the parameter
pkt
is null and the allocation of memory forret
was successful, the allocated memory is never freed.