Commit acbb80d1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix use-after-free (CID 129)

bugfix-only - the network code has been completely rewritten since
parent b5befe56
......@@ -279,9 +279,6 @@ static int OpenUDP( vlc_object_t * p_this )
else
imr.imr_interface.s_addr = INADDR_ANY;
if( psz_if_addr != NULL )
free( psz_if_addr );
msg_Dbg( p_this, "IP_ADD_SOURCE_MEMBERSHIP multicast request" );
/* Join Multicast group with source filter */
......@@ -368,8 +365,6 @@ igmpv2:
if( hiphlpapi ) FreeLibrary( hiphlpapi );
}
#endif
if( psz_if_addr != NULL ) free( psz_if_addr );
msg_Dbg( p_this, "IP_ADD_MEMBERSHIP multicast request" );
/* Join Multicast group without source filter */
if( setsockopt( i_handle, IPPROTO_IP, IP_ADD_MEMBERSHIP,
......@@ -378,9 +373,11 @@ igmpv2:
msg_Err( p_this, "failed to join IP multicast group (%s)",
strerror(errno) );
close( i_handle );
free( psz_if_addr );
return 0;
}
}
free( psz_if_addr );
}
#if !defined (__linux__) && !defined (WIN32)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment