mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 23:48:12 +00:00
[DHCPD]
Plug leaks svn path=/trunk/; revision=71335
This commit is contained in:
parent
dd2544d913
commit
a3778e6d22
2 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,7 @@ int display_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf( stdout, "Message Type: %s \n", mtype );
|
fprintf( stdout, "Message Type: %s \n", mtype );
|
||||||
|
free( mtype );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,7 @@ int process_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
||||||
if( find_lease( &dhcpl, dhcpm->xid, dhcpm->chaddr ) < 0 )
|
if( find_lease( &dhcpl, dhcpm->xid, dhcpm->chaddr ) < 0 )
|
||||||
{
|
{
|
||||||
fprintf( stdout, "No free leases! \n" );
|
fprintf( stdout, "No free leases! \n" );
|
||||||
|
free( name );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dhcpm->op = BOOTREPLY;
|
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));
|
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 );
|
display_dhcp_packet( dhcpm, dhcpo );
|
||||||
write_packet( dhcpm, name );
|
write_packet( dhcpm, name );
|
||||||
|
free( name );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dhcpm->siaddr = dhcpl.siaddr;
|
dhcpm->siaddr = dhcpl.siaddr;
|
||||||
|
@ -339,6 +341,7 @@ int process_dhcp_packet( DHCPMESSAGE *dhcpm, DHCPOPTIONS *dhcpo )
|
||||||
display_dhcp_packet( dhcpm, dhcpo );
|
display_dhcp_packet( dhcpm, dhcpo );
|
||||||
write_packet( dhcpm, name );
|
write_packet( dhcpm, name );
|
||||||
fprintf( stdout, "process_dhcp_packet [end]!\n");
|
fprintf( stdout, "process_dhcp_packet [end]!\n");
|
||||||
|
free( name );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue