Skip to content

Commit d2dc110

Browse files
qzedgregkh
authored andcommitted
platform/surface: aggregator: Add missing call to ssam_request_sync_free()
[ Upstream commit c965daa ] 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: c167b9c ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent cfd5978 commit d2dc110

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/platform/surface/aggregator/controller.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,8 +1700,10 @@ int ssam_request_sync(struct ssam_controller *ctrl,
17001700
return status;
17011701

17021702
status = ssam_request_sync_init(rqst, spec->flags);
1703-
if (status)
1703+
if (status) {
1704+
ssam_request_sync_free(rqst);
17041705
return status;
1706+
}
17051707

17061708
ssam_request_sync_set_resp(rqst, rsp);
17071709

0 commit comments

Comments
 (0)