File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -235,15 +235,12 @@ faulthandler_stack_dump_impl(int fd)
235
235
size_t length = strlen (entry_str ) + 1 ;
236
236
if (length == TRACEBACK_ENTRY_MAX_SIZE ) {
237
237
/* We exceeded the size, make it look prettier */
238
-
239
238
// Add ellipsis to last 3 characters
240
239
entry_str [TRACEBACK_ENTRY_MAX_SIZE - 5 ] = '.' ;
241
240
entry_str [TRACEBACK_ENTRY_MAX_SIZE - 4 ] = '.' ;
242
241
entry_str [TRACEBACK_ENTRY_MAX_SIZE - 3 ] = '.' ;
243
-
244
242
// Ensure trailing newline
245
243
entry_str [TRACEBACK_ENTRY_MAX_SIZE - 2 ] = '\n' ;
246
-
247
244
// Ensure that it's null-terminated
248
245
entry_str [TRACEBACK_ENTRY_MAX_SIZE - 1 ] = '\0' ;
249
246
}
@@ -253,6 +250,8 @@ faulthandler_stack_dump_impl(int fd)
253
250
if (frames == BACKTRACE_SIZE ) {
254
251
PUTS (fd , " <truncated rest of calls>\n" );
255
252
}
253
+
254
+ free (strings );
256
255
}
257
256
#undef BACKTRACE_SIZE
258
257
#undef TRACEBACK_ENTRY_MAX_SIZE
You can’t perform that action at this time.
0 commit comments