From: Marek Olšák Date: Wed, 15 Feb 2017 14:04:51 +0000 (+0100) Subject: gallium/util: correctly unref a buffer in u_prim_restart X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=02cd8b20d10e4fdc635897056f1bdfb9049d864d;p=mesa.git gallium/util: correctly unref a buffer in u_prim_restart Reviewed-by: Nicolai Hähnle --- 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; }