From: Adam Jackson Date: Sun, 2 Apr 2006 23:17:49 +0000 (+0000) Subject: Coverity #567: Fix a memory leak on a failure path. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3208c2de9ba2ba5c32af1fc6b11fec9418256ed;p=mesa.git Coverity #567: Fix a memory leak on a failure path. --- diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c index 41316de1fc4..b0e8c4c1c28 100644 --- a/src/mesa/drivers/dri/common/texmem.c +++ b/src/mesa/drivers/dri/common/texmem.c @@ -410,6 +410,7 @@ static void driTexturesGone( driTexHeap * heap, int offset, int size, fprintf( stderr, "Couldn't alloc placeholder: heap %u sz %x ofs %x\n", heap->heapId, (int)size, (int)offset ); mmDumpMemInfo( heap->memory_heap ); + FREE(t); return; } t->heap = heap;