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

Commit c6388c61 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: dynamic memory leak fix"

parents ab0a595e 7d85ad0a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -617,7 +617,8 @@ static void ipa_save_uc_smmu_mapping_pa(int res_idx, phys_addr_t pa,
{
	IPADBG("--res_idx=%d pa=0x%pa iova=0x%lx sz=0x%zx\n", res_idx,
		&pa, iova, len);
	wdi_res[res_idx].res = kzalloc(sizeof(struct ipa_wdi_res), GFP_KERNEL);
	wdi_res[res_idx].res = kzalloc(sizeof(*wdi_res[res_idx].res),
		GFP_KERNEL);
	if (!wdi_res[res_idx].res)
		BUG();
	wdi_res[res_idx].nents = 1;
@@ -643,7 +644,8 @@ static void ipa_save_uc_smmu_mapping_sgt(int res_idx, struct sg_table *sgt,
		return;
	}

	wdi_res[res_idx].res = kcalloc(sgt->nents, sizeof(struct ipa_wdi_res),
	wdi_res[res_idx].res = kcalloc(sgt->nents,
		sizeof(*wdi_res[res_idx].res),
			GFP_KERNEL);
	if (!wdi_res[res_idx].res)
		BUG();