SVACE issue fix 64/128964/2
authordongsug.song <dongsug.song@samsung.com>
Fri, 12 May 2017 07:02:40 +0000 (16:02 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Fri, 12 May 2017 07:04:00 +0000 (16:04 +0900)
Change-Id: I689f8155e0135ce024983e383c9ee23bf8150bf8
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
dali-bindings/event-thread-callback-wrap.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 736c697..96d94a3
@@ -32,21 +32,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_EventThreadCallback(SWIG_CallbackM
   void * jresult ;
   void (*arg1)(void) = (void (*)(void)) 0 ;
   Dali::EventThreadCallback *result = 0 ;
+  Dali::CallbackBase * callbackBase = 0 ;
 
   arg1 = (void (*)(void))callbackOnMakeCallback;
+  callbackBase = (Dali::CallbackBase *)Dali::MakeCallback(arg1);
   {
     try {
-      result = (Dali::EventThreadCallback *)new Dali::EventThreadCallback((Dali::CallbackBase *)Dali::MakeCallback(arg1));
+      result = (Dali::EventThreadCallback *)new Dali::EventThreadCallback(callbackBase);
     } catch (std::out_of_range& e) {
       {
+        delete result;
+        delete callbackBase;
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
       };
     } catch (std::exception& e) {
       {
+        delete result;
+        delete callbackBase;
         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
       };
     } catch (...) {
       {
+        delete result;
+        delete callbackBase;
         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
       };
     }