-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up some potential memory leaks in fwrite (#6757)
* More careful about free() before any STOP(), #ifndef location * Also don't assign mystream unless is_gzip * missing nocov ends * zstreams on stack, no more thread_streams on heap * back to !BUFF style of alloc checking * Avoid the leak on zero-row fwrite * Avoid memory leak on error path This isn't covered by the tests, but manually failing this allocation in vgdb results in a leak otherwise: 268,096 (5,952 direct, 262,144 indirect) bytes in 1 blocks are definitely lost in loss record 1,574 of 1,601 at 0x48407B4: malloc (vg_replace_malloc.c:381) by 0x74ACD86: deflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.13) by 0x90EA5232: init_stream (fwrite.c:576) by 0x90EA5EB0: fwriteMain (fwrite.c:806) by 0x90EA79EE: fwriteR (fwriteR.c:310) * Typo, translate Co-authored-by: aitap <krylov.r00t@gmail.com> * more translations of DTPRINT * Skip redundant 'else' * new cite in NEWS --------- Co-authored-by: Philippe Chataignon <philippe.chataignon@gmail.com> Co-authored-by: Ivan K <krylov.r00t@gmail.com>
- Loading branch information
1 parent
4899b39
commit 79aed53
Showing
2 changed files
with
59 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters