]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl: fix memleak 4578/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 3 Nov 2016 21:23:22 +0000 (21:23 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 3 Nov 2016 21:23:22 +0000 (21:23 +0000)
commit12104159ed88324fa95505a6a8b333dd92a80368
tree09f1c14caee1d6c30c0658c66ebbb88daacb9755
parent9156493171cf2d78e1ac1a3746c385b0e281acf1
journalctl: fix memleak

bash-4.3# journalctl --no-hostname >/dev/null

=================================================================
==288==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 48492 byte(s) in 2694 object(s) allocated from:
    #0 0x7fb4aba13e60 in malloc (/lib64/libasan.so.3+0xc6e60)
    #1 0x7fb4ab5b2cc4 in malloc_multiply src/basic/alloc-util.h:70
    #2 0x7fb4ab5b3194 in parse_field src/shared/logs-show.c:98
    #3 0x7fb4ab5b4918 in output_short src/shared/logs-show.c:347
    #4 0x7fb4ab5b7cb7 in output_journal src/shared/logs-show.c:977
    #5 0x5650e29cd83d in main src/journal/journalctl.c:2581
    #6 0x7fb4aabdb730 in __libc_start_main (/lib64/libc.so.6+0x20730)

SUMMARY: AddressSanitizer: 48492 byte(s) leaked in 2694 allocation(s).

Closes: #4568
src/shared/logs-show.c