Skip to content
Commit e4c8b456 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Kalle Valo
Browse files

rtl818x_pci: Fix a memory leak in rtl8180_init_rx_ring



When dev_alloc_skb or pci_dma_mapping_error in rtl8180_init_rx_ring fails,
the memory allocated by pci_zalloc_consistent is not freed.

This patch fixes the bug by adding pci_free_consistent
in error handling code.

Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 06d05463
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment