mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
platform/surface: aggregator: Add missing call to ssam_request_sync_free()
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: c167b9c7e3
("platform/surface: Add Surface Aggregator subsystem")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20221220175608.1436273-1-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
ae0fa0a312
commit
c965daac37
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user