[Bf-blender-cvs] [96cff85] master: Fix possible hang on buffer allocation failure. Reported by coverity scan, thanks...errr.

Antony Riakiotakis noreply at git.blender.org
Sat Nov 28 09:35:02 CET 2015


Commit: 96cff85610d9d3a6ec8b204bb69f3ab146843497
Author: Antony Riakiotakis
Date:   Sat Nov 28 09:29:57 2015 +0100
Branches: master
https://developer.blender.org/rB96cff85610d9d3a6ec8b204bb69f3ab146843497

Fix possible hang on buffer allocation failure. Reported by coverity
scan, thanks...errr.

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

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

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

diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index a55b7f7..6a60b4d 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -525,6 +525,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
 		if (!(buffer && (varray = glMapBuffer(target, GL_WRITE_ONLY)))) {
 			if (buffer)
 				gpu_buffer_free_intern(buffer);
+			BLI_mutex_unlock(&buffer_mutex);
 			return NULL;
 		}
 	}




More information about the Bf-blender-cvs mailing list