From 4d098d19f966d15e7f01f17e608fb0104fb8e6e1 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Tue, 29 Mar 2016 11:04:35 +0900 Subject: Fix null deref Change-Id: I2f06e3f71edfaa8a835a7e7416c11b727fc50961 Signed-off-by: Changyeon Lee --- src/tbm_drm_helper_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tbm_drm_helper_client.c b/src/tbm_drm_helper_client.c index 6248b6a..7bc0eea 100644 --- a/src/tbm_drm_helper_client.c +++ b/src/tbm_drm_helper_client.c @@ -117,8 +117,6 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities wl_registry_add_listener(wl_registry, ®istry_listener, tbm_drm_client); wl_display_roundtrip(display); //For Gloabl registry - wl_tbm_drm_auth_get_authentication_info(tbm_drm_client->wl_tbm_drm_auth); - wl_display_roundtrip(display); if (!tbm_drm_client->wl_tbm_drm_auth) { TBM_LOG("Failed to get wl_tbm_drm_auth interface\n"); @@ -129,6 +127,9 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities return 0; } + wl_tbm_drm_auth_get_authentication_info(tbm_drm_client->wl_tbm_drm_auth); + wl_display_roundtrip(display); + if (tbm_drm_client->auth_fd < 0) { TBM_LOG("Failed to get auth info\n"); wl_tbm_drm_auth_set_user_data(tbm_drm_client->wl_tbm_drm_auth, NULL); -- cgit v1.2.3