]> git.ipfire.org Git - thirdparty/systemd.git/commit
coredumpctl: use NULL outputs for COREDUMP existence checks 41520/head
authornoxiouz <atiurin@proton.me>
Tue, 7 Apr 2026 15:30:04 +0000 (16:30 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Wed, 8 Apr 2026 14:33:20 +0000 (16:33 +0200)
commit836de2900ba4d3b2afd015308774d26a1de2ca81
tree4ac2f83b82941f5de6354f84157cebf0aa519289
parenta5c811591ff25fef3f3fd2b6ae09eaa6eeb7e5bd
coredumpctl: use NULL outputs for COREDUMP existence checks

print_list() and print_info() used RETRIEVE() to strndup() the entire
COREDUMP field into a heap-allocated string, only to check whether it
exists.  With sd_journal_set_data_threshold(j, 0) in print_info(),
this copies the full coredump binary (potentially hundreds of MB) to
heap just to print "Storage: journal".

Now that sd_journal_get_data() accepts NULL output pointers, use a
direct NULL/NULL existence check instead.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
src/coredump/coredumpctl.c