Author: pschweitzer
Date: Sun May 15 17:45:10 2016
New Revision: 71335
URL:
http://svn.reactos.org/svn/reactos?rev=71335&view=rev
Log:
[DHCPD]
Plug leaks
Modified:
trunk/rosapps/applications/net/dhcpd/src/display/display.c
trunk/rosapps/applications/net/dhcpd/src/parsing/parser.c
Modified: trunk/rosapps/applications/net/dhcpd/src/display/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/dhcpd/src…
==============================================================================
--- trunk/rosapps/applications/net/dhcpd/src/display/display.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/dhcpd/src/display/display.c [iso-8859-1] Sun May 15
17:45:10 2016
@@ -56,6 +56,7 @@
break;
}
fprintf( stdout, "Message Type: %s \n", mtype );
+ free( mtype );
return 0;
}
Modified: trunk/rosapps/applications/net/dhcpd/src/parsing/parser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/dhcpd/src…
==============================================================================
--- trunk/rosapps/applications/net/dhcpd/src/parsing/parser.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/dhcpd/src/parsing/parser.c [iso-8859-1] Sun May 15
17:45:10 2016
@@ -209,6 +209,7 @@
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 @@
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 @@
display_dhcp_packet( dhcpm, dhcpo );
write_packet( dhcpm, name );
fprintf( stdout, "process_dhcp_packet [end]!\n");
+ free( name );
return 0;
}