Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix memory leak #4

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

fix memory leak #4

wants to merge 13 commits into from

Conversation

dududuguo
Copy link

Memory leak

  • This patch is for fixing 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants