mirror of
https://github.com/reactos/reactos.git
synced 2024-09-27 21:16:34 +00:00
[DHCPD]
Plug leaks svn path=/trunk/; revision=71335
This commit is contained in:
parent
dd2544d913
commit
a3778e6d22
|
@ -56,6 +56,7 @@ int display_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
|||
break;
|
||||
}
|
||||
fprintf( stdout, "Message Type: %s \n", mtype );
|
||||
free( mtype );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -209,6 +209,7 @@ int process_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
|||
if( find_lease( &dhcpl, dhcpm->xid, dhcpm->chaddr ) < 0 )
|
||||
{
|
||||
fprintf( stdout, "No free leases! \n" );
|
||||
free( name );
|
||||
return -1;
|
||||
}
|
||||
dhcpm->op = BOOTREPLY;
|
||||
|
@ -281,6 +282,7 @@ int process_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
|||
sprintf( name, "%u.%u.%u.%u", (dhcpm->ciaddr &0xFF), ((dhcpm->ciaddr>>8)&0xFF), ((dhcpm->ciaddr>>16)&0xFF), ((dhcpm->ciaddr>>24)&0xFF));
|
||||
display_dhcp_packet( dhcpm, dhcpo );
|
||||
write_packet( dhcpm, name );
|
||||
free( name );
|
||||
return -1;
|
||||
}
|
||||
dhcpm->siaddr = dhcpl.siaddr;
|
||||
|
@ -339,6 +341,7 @@ int process_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
|||
display_dhcp_packet( dhcpm, dhcpo );
|
||||
write_packet( dhcpm, name );
|
||||
fprintf( stdout, "process_dhcp_packet [end]!\n");
|
||||
free( name );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue