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

fixed memory leak in user_options_check_files() #2671

Closed
wants to merge 1 commit into from

Conversation

matrix
Copy link
Member

@matrix matrix commented Dec 29, 2020

==37917== 1,792 bytes in 14 blocks are definitely lost in loss record 409 of 425
==37917==    at 0x100272086: malloc (in /usr/local/Cellar/valgrind/3.16.1/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==37917==    by 0x10071139E: _vasprintf (in /usr/lib/system/libsystem_c.dylib)
==37917==    by 0x1000663FB: hc_asprintf (shared.c:264)
==37917==    by 0x100080212: user_options_check_files (user_options.c:2957)
==37917==    by 0x10003C599: hashcat_session_init (hashcat.c:1104)
==37917==    by 0x100000D20: main (main.c:1157)

@jsteube
Copy link
Member

jsteube commented Apr 4, 2021

OK, I understand the need for the both free() to fix the issue, but why replace the asprintf() with snprintf(). Is valgrind still reporting the issue after only adding the both free()?

@matrix
Copy link
Member Author

matrix commented Apr 4, 2021

OK, I understand the need for the both free() to fix the issue, but why replace the asprintf() with snprintf(). Is valgrind still reporting the issue after only adding the both free()?

Hi, I don't remember it honestly, I should try again

jsteube added a commit that referenced this pull request May 4, 2021
@jsteube
Copy link
Member

jsteube commented May 4, 2021

Implemented with 5d7dc3c

@jsteube jsteube closed this May 4, 2021
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.

None yet

2 participants