diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2015-03-22 21:29:31 +0300 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2015-03-22 21:29:42 +0300 |
commit | 059d5bc80988320dca9cc2797d7bddc75ba0b82f (patch) | |
tree | a4fa9ee2ceccaef153865921f7d8e180b622a14b /intern/ghost | |
parent | e7d051043dc82c2991eb491e0630d9b1065934c3 (diff) |
OSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop, backport to 2.74
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_EventDragnDrop.h | 1 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h index c51f9568087..b7bf37c99d8 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 095c738e1e0..ed1200b967c 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*)); |