[Bf-blender-cvs] [d58765c] GPU_data_request: fix mismatched memory free

Mike Erwin noreply at git.blender.org
Thu May 14 06:38:48 CEST 2015


Commit: d58765ccb312690429ce5449a5fc264583838313
Author: Mike Erwin
Date:   Thu May 14 00:38:10 2015 -0400
Branches: GPU_data_request
https://developer.blender.org/rBd58765ccb312690429ce5449a5fc264583838313

fix mismatched memory free

This string is copied with strdup during GPUx_specify_attrib, needs a
plain free.

===================================================================

M	source/blender/gpu/intern/gpux_vbo.c

===================================================================

diff --git a/source/blender/gpu/intern/gpux_vbo.c b/source/blender/gpu/intern/gpux_vbo.c
index eab3fec..1888617 100644
--- a/source/blender/gpu/intern/gpux_vbo.c
+++ b/source/blender/gpu/intern/gpux_vbo.c
@@ -4,6 +4,7 @@
 #include "GPU_extensions.h"
 #include "BLI_utildefines.h"
 #include "MEM_guardedalloc.h"
+#include <stdlib.h>
 #include <string.h>
 
 #ifdef PRINT
@@ -169,7 +170,7 @@ void GPUx_vertex_buffer_discard(VertexBuffer *buff)
 			buffer_id_free(a->vbo_id);
 #endif /* USE_VBO */
 #ifdef GENERIC_ATTRIB
-		MEM_freeN(a->name);
+		free(a->name);
 #endif /* GENERIC_ATTRIB */
 		if (a->data)
 			MEM_freeN(a->data);




More information about the Bf-blender-cvs mailing list