Patch "platform/surface: aggregator: Add missing call to ssam_request_sync_free()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/surface: aggregator: Add missing call to ssam_request_sync_free()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-surface-aggregator-add-missing-call-to-ssam.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 304074d2f036c0bf41af15138534a94479b1bb81
Author: Maximilian Luz <luzmaximilian@xxxxxxxxx>
Date:   Tue Dec 20 18:56:07 2022 +0100

    platform/surface: aggregator: Add missing call to ssam_request_sync_free()
    
    [ Upstream commit c965daac370f08a9b71d573a71d13cda76f2a884 ]
    
    Although rare, ssam_request_sync_init() can fail. In that case, the
    request should be freed via ssam_request_sync_free(). Currently it is
    leaked instead. Fix this.
    
    Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")
    Signed-off-by: Maximilian Luz <luzmaximilian@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20221220175608.1436273-1-luzmaximilian@xxxxxxxxx
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
index b8c377b3f932..f23f7128cf2b 100644
--- a/drivers/platform/surface/aggregator/controller.c
+++ b/drivers/platform/surface/aggregator/controller.c
@@ -1700,8 +1700,10 @@ int ssam_request_sync(struct ssam_controller *ctrl,
 		return status;
 
 	status = ssam_request_sync_init(rqst, spec->flags);
-	if (status)
+	if (status) {
+		ssam_request_sync_free(rqst);
 		return status;
+	}
 
 	ssam_request_sync_set_resp(rqst, rsp);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux