mirror of https://github.com/ipxe/ipxe.git
Free up any allocated options if we fail
parent
764cb41456
commit
6a0b4c9772
|
@ -476,6 +476,14 @@ udp_to_dhcp ( struct udp_connection *conn ) {
|
||||||
* @v rc Return status code
|
* @v rc Return status code
|
||||||
*/
|
*/
|
||||||
static void dhcp_done ( struct dhcp_session *dhcp, int rc ) {
|
static void dhcp_done ( struct dhcp_session *dhcp, int rc ) {
|
||||||
|
/* Free up options if we failed */
|
||||||
|
if ( rc != 0 ) {
|
||||||
|
if ( dhcp->options ) {
|
||||||
|
free_dhcp_options ( dhcp->options );
|
||||||
|
dhcp->options = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Mark async operation as complete */
|
/* Mark async operation as complete */
|
||||||
async_done ( &dhcp->aop, rc );
|
async_done ( &dhcp->aop, rc );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue