|
@@ -590,8 +590,10 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
|
|
packet = kmalloc(sizeof(struct ipw_rx_packet) +
|
|
packet = kmalloc(sizeof(struct ipw_rx_packet) +
|
|
old_packet->length + minimum_free_space,
|
|
old_packet->length + minimum_free_space,
|
|
GFP_ATOMIC);
|
|
GFP_ATOMIC);
|
|
- if (!packet)
|
|
|
|
|
|
+ if (!packet) {
|
|
|
|
+ kfree(old_packet);
|
|
return NULL;
|
|
return NULL;
|
|
|
|
+ }
|
|
memcpy(packet, old_packet,
|
|
memcpy(packet, old_packet,
|
|
sizeof(struct ipw_rx_packet)
|
|
sizeof(struct ipw_rx_packet)
|
|
+ old_packet->length);
|
|
+ old_packet->length);
|