]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
avoid a permanent memory leak on lightmap allocation in q1bsp - no time
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 Dec 2009 06:22:59 +0000 (06:22 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 Dec 2009 06:22:59 +0000 (06:22 +0000)
to investigate the underlying cause

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9592 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index 040b1ba0de43394d9f57b0a33bca3c61919a6036..771aa39b44e5a0a1e1e33ed0a524b29eeb1abea2 100644 (file)
@@ -2942,7 +2942,7 @@ void Mod_AllocLightmap_Init(mod_alloclightmap_state_t *state, int width, int hei
        state->width = width;
        state->height = height;
        state->currentY = 0;
-       state->rows = Mem_Alloc(tempmempool, state->height * sizeof(*state->rows));
+       state->rows = Mem_Alloc(loadmodel->mempool, state->height * sizeof(*state->rows));
        for (y = 0;y < state->height;y++)
        {
                state->rows[y].currentX = 0;