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

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

Merge "rpm-smd: Fix memory leak when rpm create request fails"

parents 52912bb7 aa74021f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -967,8 +967,10 @@ static struct msm_rpm_request *msm_rpm_create_request_common(

	cdata->client_buf = kzalloc(buf_size, GFP_FLAG(noirq));

	if (!cdata->client_buf)
		goto cdata_alloc_fail;
	if (!cdata->client_buf) {
		pr_warn("Cannot allocate memory for client_buf\n");
		goto client_buf_alloc_fail;
	}

	set_set_type(cdata->client_buf, set);
	set_rsc_type(cdata->client_buf, rsc_type);
@@ -997,6 +999,8 @@ static struct msm_rpm_request *msm_rpm_create_request_common(
buf_alloc_fail:
	kfree(cdata->kvp);
kvp_alloc_fail:
	kfree(cdata->client_buf);
client_buf_alloc_fail:
	kfree(cdata);
cdata_alloc_fail:
	return NULL;