mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-04 07:51:19 +00:00
If the callee gpmi_alloc_dma_buffer() failed to alloc memory for
this->raw_buffer, gpmi_free_dma_buffer() will be called to free
this->auxiliary_virt. But this->auxiliary_virt is still a non-NULL
and valid ptr.
Then gpmi_alloc_dma_buffer() returns err and gpmi_free_dma_buffer()
is called again to free this->auxiliary_virt in err_out. This causes
a double free.
As gpmi_free_dma_buffer() has already called in gpmi_alloc_dma_buffer's
error path, so it should return err directly instead of releasing the dma
buffer again.
Fixes:
|
||
|---|---|---|
| .. | ||
| bch-regs.h | ||
| gpmi-nand.c | ||
| gpmi-nand.h | ||
| gpmi-regs.h | ||
| Makefile | ||