aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Ott <alan@softiron.co.uk>2016-08-30 12:04:28 -0400
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-30 17:24:18 +0100
commit7bc42ad39700474290abdac30b5005577c4df57a (patch)
tree07505203e4bb6123ac9593e723787797171dce31
parent5125821c7ef5b48bcce97fc6ead506b16ee67187 (diff)
Drivers/Net/MarvellYukon: Free link if its DMA buffer can't be allocated
msk_rxeof() allocates a link object which contains a buffer. If the buffer can't be allocated, make sure to free the link object. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alan Ott <alan@softiron.co.uk> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-rw-r--r--Drivers/Net/MarvellYukonDxe/if_msk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Drivers/Net/MarvellYukonDxe/if_msk.c b/Drivers/Net/MarvellYukonDxe/if_msk.c
index 056bf03..ecd716a 100644
--- a/Drivers/Net/MarvellYukonDxe/if_msk.c
+++ b/Drivers/Net/MarvellYukonDxe/if_msk.c
@@ -1943,6 +1943,7 @@ msk_rxeof (
InsertTailList (&mSoftc->ReceiveQueueHead, &m_link->Link);
} else {
DEBUG ((EFI_D_NET, "Marvell Yukon: failed to allocate DMA buffer. Dropping Frame\n"));
+ gBS->FreePool (m_link);
}
} else {
DEBUG ((EFI_D_NET, "Marvell Yukon: failed to allocate receive buffer link. Dropping Frame\n"));