Commit: 3cf120be6764e4c7bb04a84f19cd0806a9cdeec0 Author: Jens Verwiebe Date: Sun Mar 22 19:29:31 2015 +0100 Branches: blender-v2.74-release https://developer.blender.org/rB3cf120be6764e4c7bb04a84f19cd0806a9cdeec0
OSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop, backport to 2.74 =================================================================== M intern/ghost/intern/GHOST_EventDragnDrop.h M intern/ghost/intern/GHOST_SystemCocoa.mm =================================================================== diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h index c51f956..b7bf37c 100644 --- a/intern/ghost/intern/GHOST_EventDragnDrop.h +++ b/intern/ghost/intern/GHOST_EventDragnDrop.h @@ -112,6 +112,7 @@ public: for (i = 0; i < strArray->count; i++) free(strArray->strings[i]); + free(strArray->strings); free(strArray); } break; diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 095c738..ed1200b 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -882,7 +882,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType if (!strArray) return GHOST_kFailure; strArray->count = [droppedArray count]; - if (strArray->count == 0) return GHOST_kFailure; + if (strArray->count == 0) { + free(strArray); + return GHOST_kFailure; + } strArray->strings = (GHOST_TUns8**) malloc(strArray->count*sizeof(GHOST_TUns8*)); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs