Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6dc9bab authored by Ping Li's avatar Ping Li
Browse files

msm: mdss: Add NULL check before de-allocating framebuffer



Add NULL check before de-allocating framebuffer to avoid NULL
pointer de-reference.

CRs-Fixed: 1003106
Change-Id: I0f3c44671d3ca1b665e91ad314513bb743f23d3c
Signed-off-by: default avatarPing Li <pingli@codeaurora.org>
parent 22c4c57b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1951,7 +1951,9 @@ void mdss_fb_free_fb_ion_memory(struct msm_fb_data_type *mfd)

	ion_unmap_kernel(mfd->fb_ion_client, mfd->fb_ion_handle);

	if (mfd->mdp.fb_mem_get_iommu_domain) {
	if (mfd->mdp.fb_mem_get_iommu_domain && !(!mfd->fb_attachment ||
		!mfd->fb_attachment->dmabuf ||
		!mfd->fb_attachment->dmabuf->ops)) {
		dma_buf_unmap_attachment(mfd->fb_attachment, mfd->fb_table,
				DMA_BIDIRECTIONAL);
		dma_buf_detach(mfd->fbmem_buf, mfd->fb_attachment);