diff options
author | Kenny Levinsen <kl@kl.wtf> | 2024-02-22 00:36:25 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2024-02-22 00:41:06 +0100 |
commit | 0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5 (patch) | |
tree | dbbbae713f5e6144bea1529f05d03590ebd56bce | |
parent | 8dec0f61742b805a75af82ad438798762b3e32b5 (diff) |
drm-lease-v1: Free the wlr_drm_lease_v1 on error
-rw-r--r-- | types/wlr_drm_lease_v1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c index 74de857d..d3c9ba1f 100644 --- a/types/wlr_drm_lease_v1.c +++ b/types/wlr_drm_lease_v1.c @@ -177,6 +177,7 @@ struct wlr_drm_lease_v1 *wlr_drm_lease_request_v1_grant( if (!lease->drm_lease) { wlr_log(WLR_ERROR, "wlr_drm_create_lease failed"); wp_drm_lease_v1_send_finished(lease->resource); + free(lease); return NULL; } @@ -185,6 +186,7 @@ struct wlr_drm_lease_v1 *wlr_drm_lease_request_v1_grant( wlr_log(WLR_ERROR, "Failed to allocate lease connectors list"); close(fd); wp_drm_lease_v1_send_finished(lease->resource); + free(lease); return NULL; } lease->n_connectors = request->n_connectors; |