Skip to content

Commit

Permalink
Fix potential segfault during multicast cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Sep 25, 2024
1 parent 041d0e9 commit 171a567
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/system/unix/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ void _z_close_udp_multicast(_z_sys_net_socket_t *sockrecv, _z_sys_net_socket_t *
// Required to be compliant with MISRA 15.7 rule
}
#if defined(ZENOH_LINUX)
z_free(lep._iptcp->ai_addr);
if (lep._iptcp != NULL) {
z_free(lep._iptcp->ai_addr);
}
#else
_ZP_UNUSED(lep);
#endif
Expand Down

0 comments on commit 171a567

Please sign in to comment.