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

Fix use-after-free (CID 130)

Does not affect master
parent 8d5543f5
......@@ -350,7 +350,6 @@ mldv1:
if( psz_mif != NULL )
{
int intf = if_nametoindex( psz_mif );
free( psz_mif );
if( intf != 0 )
{
......@@ -359,8 +358,9 @@ mldv1:
{
msg_Err( p_this, "%s as multicast interface: %s",
psz_mif, strerror(errno) );
free( psz_mif );
close( i_handle );
return 0;
i_handle = -1;
}
}
else
......@@ -368,8 +368,11 @@ mldv1:
msg_Err( p_this, "%s: bad IPv6 interface specification",
psz_mif );
close( i_handle );
return 0;
i_handle = -1;
}
free( psz_mif );
if( i_handle == -1 )
return 0;
}
}
}
......
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