Changeset 5927


Ignore:
Timestamp:
Oct 28, 2015 3:41:05 PM (7 years ago)
Author:
clarksm
Message:

Fix memory allocation issue revealed when using newer Matlab versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/lang/matlab/rpExec.c

    r5919 r5927  
    246246   }
    247247
    248    if(nlhs > 1) {
     248   if(nlhs > 0) {
    249249      plhs[0] = mxCreateNumericMatrix(1,1,mxINT32_CLASS,mxREAL);
    250250      return1 = (int *)mxGetData(plhs[0]);
     
    260260   }
    261261
    262    mxFree(commandOutput.stdoutBuffer);
    263    mxFree(commandOutput.stderrBuffer);
    264 }
    265 
    266 
     262   free(commandOutput.stdoutBuffer);
     263   free(commandOutput.stderrBuffer);
     264}
     265
     266
Note: See TracChangeset for help on using the changeset viewer.