42-Lyon-Projects / minishell-revamp

0 stars 1 forks source link

[BUG] Parsing leak #8

Closed vSKAH closed 10 months ago

vSKAH commented 10 months ago

already_exist

Github Branch Name

master

Discord username

vSKAH

What Happened ?

When minishell is exited correctly a certain amount of bytes leaked

Steps to reproduce the bug / problem.

Start minishell, types commands and type exit

What was supposed to happen ?

no leak

Screenshot or vidéo

No response

More informations

➜ minishell : grep|echo|test COMMAND: |grep| COMMAND: |echo| COMMAND: |test| ➜ minishell : exit COMMAND: |exit|

HEAP SUMMARY: in use at exit: 208,258 bytes in 229 blocks total heap usage: 1,211 allocs, 982 frees, 243,295 bytes allocated

29 bytes in 7 blocks are definitely lost in loss record 11 of 64 at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x10C498: ft_substr (in /home/jbadaire/Desktop/minishell-revamp/minishell) by 0x1095F3: ft_delete_cmd_space (cmd_transformer.c:42) by 0x109BF3: ft_post_command (cmd_transformer.c:172) by 0x10AE40: ft_dispatch_commands (exec_dispatcher.c:27) by 0x10ADC7: parse_input (parsing.c:111) by 0x10935C: ft_shell_loop (main.c:30) by 0x109402: main (main.c:44)

LEAK SUMMARY: definitely lost: 29 bytes in 7 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks still reachable: 0 bytes in 0 blocks suppressed: 208,229 bytes in 222 blocks

LuyNagda commented 10 months ago

Fixed in 10th issue.