diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-21 19:18:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-21 19:18:39 +0200 |
commit | e0cf97da6965cb7717742efa7be93ed4233e53aa (patch) | |
tree | fd7d74383c114bb8b05a388976d39e86416460ce /backend | |
parent | be6210cf8216c08a91e085dac0ec11d0e34fb217 (diff) | |
parent | a9e02a9ea6dcf45d2c36d6f19a7761746dd85a87 (diff) |
Merge pull request #1307 from emersion/static-analysis
Fix a few bugs found by the static analyzer
Diffstat (limited to 'backend')
-rw-r--r-- | backend/backend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/backend.c b/backend/backend.c index 4b186767..c5dcdb48 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -217,16 +217,16 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display, backend, &multi->session, name, create_renderer_func); if (subbackend == NULL) { wlr_log(WLR_ERROR, "failed to start backend '%s'", name); - wlr_backend_destroy(backend); wlr_session_destroy(multi->session); + wlr_backend_destroy(backend); free(names); return NULL; } if (!wlr_multi_backend_add(backend, subbackend)) { wlr_log(WLR_ERROR, "failed to add backend '%s'", name); - wlr_backend_destroy(backend); wlr_session_destroy(multi->session); + wlr_backend_destroy(backend); free(names); return NULL; } @@ -272,8 +272,8 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display, multi->session); if (!libinput) { wlr_log(WLR_ERROR, "Failed to start libinput backend"); - wlr_backend_destroy(backend); wlr_session_destroy(multi->session); + wlr_backend_destroy(backend); return NULL; } wlr_multi_backend_add(backend, libinput); @@ -283,8 +283,8 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display, if (!primary_drm) { wlr_log(WLR_ERROR, "Failed to open any DRM device"); wlr_backend_destroy(libinput); - wlr_backend_destroy(backend); wlr_session_destroy(multi->session); + wlr_backend_destroy(backend); return NULL; } |