From 02cd8b20d10e4fdc635897056f1bdfb9049d864d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 15 Feb 2017 15:04:51 +0100 Subject: gallium/util: correctly unref a buffer in u_prim_restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/util/u_prim_restart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_prim_restart.c b/src/gallium/auxiliary/util/u_prim_restart.c index a4d7c1433d9..e45aa562a4f 100644 --- a/src/gallium/auxiliary/util/u_prim_restart.c +++ b/src/gallium/auxiliary/util/u_prim_restart.c @@ -117,7 +117,7 @@ error: if (dst_transfer) pipe_buffer_unmap(context, dst_transfer); if (*dst_buffer) - screen->resource_destroy(screen, *dst_buffer); + pipe_resource_reference(dst_buffer, NULL); return PIPE_ERROR_OUT_OF_MEMORY; } -- cgit v1.2.3