dcfldd icon indicating copy to clipboard operation
dcfldd copied to clipboard

Fix memory leaks

Open lucic71 opened this issue 9 months ago • 3 comments

lucic71 avatar May 07 '24 17:05 lucic71

hashstr_buf also seems to be read in a lot of places but never written.

Edit: hastype_t.final, which usee hashstr_buf, isn't written anywhere, as well.

lucic71 avatar May 07 '24 20:05 lucic71

Hmm. For this one, I will leave it for the time when I'm able to run it through valgrind and gdb (probably over the weekend) and see whether data is ever written on those locations.

davidpolverari avatar May 09 '24 13:05 davidpolverari

@davidpolverari unfixed compile warnings in the CI logs seem to confirm. This is for latest master:

2024-05-08T02:42:50.0167219Z verify.c:147:11: warning: variable 'i_hashstr_buf' set but not used [-Wunused-but-set-variable]
2024-05-08T02:42:50.0167811Z   147 |     char *i_hashstr_buf;
2024-05-08T02:42:50.0168195Z       |           ^
2024-05-08T02:42:50.0168870Z verify.c:148:11: warning: variable 'v_hashstr_buf' set but not used [-Wunused-but-set-variable]
2024-05-08T02:42:50.0169458Z   148 |     char *v_hashstr_buf;
2024-05-08T02:42:50.0169840Z       |           ^

hartwork avatar May 09 '24 14:05 hartwork

Merged on master. Closing manually, as I had to rebase before merging. Thanks for the help!

davidpolverari avatar May 26 '24 15:05 davidpolverari