taliesinb commented on a change in pull request #13376: Fix incorrect delete in 
MXExecutorReshape exception handling
URL: https://github.com/apache/incubator-mxnet/pull/13376#discussion_r236609137
 
 

 ##########
 File path: src/c_api/c_api_executor.cc
 ##########
 @@ -560,6 +560,7 @@ int MXExecutorReshape(int partial_shaping,
                       ExecutorHandle *out) {
   MXAPIThreadLocalEntry *ret = MXAPIThreadLocalStore::Get();
   API_BEGIN();
+  *out = nullptr; // ensure we can know whether to free executor on early abort
 
 Review comment:
   I've added the space, and am also creating a temporary pointer for the new 
executor as I see is done in other functions like MXExecutorGetOptimizedSymbol.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to