Fix null deref 58/65558/1 accepted/tizen/common/20160414.142626 accepted/tizen/ivi/20160415.014826 accepted/tizen/mobile/20160415.014850 accepted/tizen/tv/20160415.014745 accepted/tizen/wearable/20160415.014807 submit/tizen/20160414.040521
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 29 Mar 2016 02:04:35 +0000 (11:04 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Mon, 11 Apr 2016 02:09:20 +0000 (11:09 +0900)
Change-Id: I2f06e3f71edfaa8a835a7e7416c11b727fc50961
Signed-off-by: Changyeon Lee <cyeon.lee@samsung.com>
src/tbm_drm_helper_client.c

index 6248b6a..7bc0eea 100644 (file)
@@ -117,8 +117,6 @@ tbm_drm_helper_get_auth_info(int *auth_fd, char **device, uint32_t *capabilities
 
        wl_registry_add_listener(wl_registry, &registry_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);