zink: fix free of ralloced pointer

When we alloc with ralloc, we also need to free with it.

But let's take a step back here; we don't just need to use ralloc, we
also need to destroy all other screen-resources. So let's call the
destructor here instead.

Fixes: 2643f9ed28 ("zink: ralloc screen objects")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9647>
This commit is contained in:
Erik Faye-Lund
2021-03-17 10:32:15 +01:00
committed by Marge Bot
parent 539036a990
commit d4bcb58caf
+1 -1
View File
@@ -1461,7 +1461,7 @@ zink_drm_create_screen(int fd, const struct pipe_screen_config *config)
if (ret && !ret->info.have_KHR_external_memory_fd) {
debug_printf("ZINK: KHR_external_memory_fd required!\n");
free(ret);
zink_destroy_screen(&ret->base);
return NULL;
}