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

Commit 9e43c50d authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Lee Jones
Browse files

UPSTREAM: rpmsg: glink: Release driver_override



commit fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8 upstream.

Upon termination of the rpmsg_device, driver_override needs to be freed
to avoid leaking the potentially assigned string.

Bug: 295334746
Fixes: 42cd402b8fd4 ("rpmsg: Fix kfree() of static memory on setting driver_override")
Fixes: 39e47767 ("rpmsg: Add driver_override device attribute for rpmsg_device")
Reviewed-by: default avatarChris Lew <quic_clew@quicinc.com>
Signed-off-by: default avatarBjorn Andersson <quic_bjorande@quicinc.com>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230109223931.1706429-1-quic_bjorande@quicinc.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a82e0fda8a2f8561a6a6681e8b3557e60cad17da)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I08b147ad640a8e2d71699a09815bbf048425a1fd
parent e172d704
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1375,6 +1375,7 @@ static void qcom_glink_rpdev_release(struct device *dev)
	struct glink_channel *channel = to_glink_channel(rpdev->ept);

	channel->rpdev = NULL;
	kfree(rpdev->driver_override);
	kfree(rpdev);
}