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

Commit c36b1855 authored by Vinayaka B M's avatar Vinayaka B M
Browse files

msm: ipa: Set the logbuf NULL after destroy

Set the ipa3_ctx->logbuf NULL after destroy,or
IPAERR will use the ipa3_ctx->logbuf after free it,
that can make crash

Change-Id: I470c4a043d426d7620c01fadac1f1cd12ad54b08
parent 8aa0d102
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7947,8 +7947,10 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
	kfree(ipa3_ctx->ipa_tz_unlock_reg);
	ipa3_ctx->ipa_tz_unlock_reg = NULL;
fail_tz_unlock_reg:
	if (ipa3_ctx->logbuf)
	if (ipa3_ctx->logbuf) {
		ipc_log_context_destroy(ipa3_ctx->logbuf);
		ipa3_ctx->logbuf = NULL;
	}
fail_uc_file_alloc:
	kfree(ipa3_ctx->gsi_fw_file_name);
	ipa3_ctx->gsi_fw_file_name = NULL;