We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc69cf4 commit 980338cCopy full SHA for 980338c
src/profiler.cpp
@@ -902,6 +902,10 @@ Error Profiler::start(Arguments& args, bool reset) {
902
free(_calltrace_buffer[i]);
903
_calltrace_buffer[i] = (CallTraceBuffer*)calloc(nelem, sizeof(CallTraceBuffer));
904
if (_calltrace_buffer[i] == NULL) {
905
+ for (int j = i - 1; j >= 0; j--) {
906
+ free(_calltrace_buffer[i]);
907
+ _calltrace_buffer[i] = NULL;
908
+ }
909
_max_stack_depth = 0;
910
return Error("Not enough memory to allocate stack trace buffers (try smaller jstackdepth)");
911
}
0 commit comments