Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Memory leak
when i input ls or exit:
=================================================================
==68496==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 2 object(s) allocated from:
#0 0x7f2e85dd29a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
#1 0x55d2b8adbb9f in shell_line_parse /Shell/shell.c:116
#2 0x55d2b8adba24 in shell_loop /Shell/shell.c:91
#3 0x55d2b8adb6cd in main /Shell/shell.c:29
#4 0x7f2e85a79d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Objects leaked above:
0x602000007390 (3 bytes)
0x6020000074d0 (5 bytes)
SUMMARY: AddressSanitizer: 8 byte(s) leaked in 2 allocation(s).