]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/pcmcia/ipwireless/hardware.c
Merge branch 'core/rodata' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
[linux-2.6-omap-h63xx.git] / drivers / char / pcmcia / ipwireless / hardware.c
index ba6340ae98afa1f7a5f80bb33360270aa4cc7cc8..929101ecbae29c180889a1d10e8c7f0549bcd713 100644 (file)
@@ -590,8 +590,10 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
                packet = kmalloc(sizeof(struct ipw_rx_packet) +
                                old_packet->length + minimum_free_space,
                                GFP_ATOMIC);
-               if (!packet)
+               if (!packet) {
+                       kfree(old_packet);
                        return NULL;
+               }
                memcpy(packet, old_packet,
                                sizeof(struct ipw_rx_packet)
                                        + old_packet->length);