dri2_sync = calloc(1, sizeof(struct dri2_egl_sync));
if (!dri2_sync) {
+ close(release_fence_fd);
return EGL_FALSE;
}
EGL_SYNC_NATIVE_FENCE_TIZEN,
attrib_list)) {
free(dri2_sync);
+ close(release_fence_fd);
return EGL_FALSE;
}
if (!dri2_sync->fence) {
free(dri2_sync);
+ close(release_fence_fd);
return EGL_FALSE;
}
- if (p_atomic_dec_zero(&dri2_sync->refcount)) {
- close(dri2_sync->base.SyncFd);
-
- if (dri2_sync->fence)
- dri2_dpy->fence->destroy_fence(dri2_dpy->dri_screen, dri2_sync->fence);
- free(dri2_sync);
- }
+ close(dri2_sync->base.SyncFd);
+ if (dri2_sync->fence)
+ dri2_dpy->fence->destroy_fence(dri2_dpy->dri_screen_render_gpu, dri2_sync->fence);
+ free(dri2_sync);
return EGL_TRUE;
}