LukasKava / Minishell

0 stars 0 forks source link

$>unset OLDPWD $> env | grep OLDPWD #50

Closed Gotr-byte closed 1 year ago

Gotr-byte commented 1 year ago

================================================================= ==8053==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 6 byte(s) in 1 object(s) allocated from:

0 0x7fa806a4e867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145

#1 0x5601a923001f in ft_calloc (/home/piotr/code/minish/minishell+0x1b01f)
#2 0x5601a92279c9 in save_name src/builtins/builtins_utils.c:121
#3 0x5601a922ba00 in delete_env_node src/builtins/unset.c:64
#4 0x5601a922c0ea in builtins_unset src/builtins/unset.c:130
#5 0x5601a922f796 in unset_handle src/execute/builtin_handles.c:95
#6 0x5601a922cb18 in built_in_handler src/execute/new_fork.c:99
#7 0x5601a922ce20 in execute src/execute/new_fork.c:126
#8 0x5601a9219e47 in parsing_and_execution src/parsing/main.c:123
#9 0x5601a921a0f6 in main src/parsing/main.c:155
#10 0x7fa806747d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 6 byte(s) leaked in 1 allocation(s).

LukasKava commented 1 year ago

fixed the name src is not even used anymore in this leak