kernel/nata - Fix a memory leak in ata-dma.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 28 Feb 2014 13:04:50 +0000 (14:04 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 28 Feb 2014 17:43:48 +0000 (18:43 +0100)
sys/dev/disk/nata/ata-dma.c

index 1e1fe65..222c91e 100644 (file)
@@ -194,6 +194,8 @@ ata_dmafree(device_t dev)
        bus_dma_tag_destroy(ch->dma->dmatag);
        ch->dma->dmatag = NULL;
     }
+    if (ch->dma)
+       kfree(ch->dma, M_ATADMA);
 }
 
 static void