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

Commit 286d4997 authored by Mohammed Javid's avatar Mohammed Javid
Browse files

msm:ipa: Fix memleak issue



While initializing IPv6 NAT device, temp memory
for device is allocated and initialized but it
has not been destroyed. Deallocate device temp
memory during device deinitialization.

Change-Id: Ifdce977464a1a57ff6ad939413f7f1481eeae4a3
Acked-by: default avatarPooja Kumari <kumarip@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent bdd918fd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -272,6 +272,9 @@ static void ipa3_nat_ipv6ct_destroy_device(

	mutex_lock(&dev->lock);

	dma_free_coherent(ipa3_ctx->pdev, IPA_NAT_IPV6CT_TEMP_MEM_SIZE,
		dev->tmp_mem->vaddr, dev->tmp_mem->dma_handle);
	kfree(dev->tmp_mem);
	device_destroy(dev->class, dev->dev_num);
	unregister_chrdev_region(dev->dev_num, 1);
	class_destroy(dev->class);