Coverity #567: Fix a memory leak on a failure path.
authorAdam Jackson <ajax@freedesktop.org>
Sun, 2 Apr 2006 23:17:49 +0000 (23:17 +0000)
committerAdam Jackson <ajax@freedesktop.org>
Sun, 2 Apr 2006 23:17:49 +0000 (23:17 +0000)
src/mesa/drivers/dri/common/texmem.c

index 41316de1fc46e036ca48ad47b62ff0d21a1e58c8..b0e8c4c1c2824c871168bfbfd8862c21fd1b586b 100644 (file)
@@ -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;