]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal-remote: fix hostname double-free on request_meta() error paths 42733/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 24 Jun 2026 12:41:06 +0000 (13:41 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 25 Jun 2026 14:50:28 +0000 (15:50 +0100)
commit94d49182a0ff3dc328f87c36152227e5ab82a0b2
tree3acd4935f29d8771a2f9fbcc63ddab04e69fabaa
parentf8891704d32170ac7106ca20630515b5688f3a97
journal-remote: fix hostname double-free on request_meta() error paths

request_handler() owns the hostname var and passes it by value to
request_meta(), which hands it to source_new(), which stores it in
source->importer.name without copying. If build_accept_encoding()
then fails, the hostname var is freed, and then the caller's
_cleanup_free_ frees it a second time.

Follow-up for 9ff48d0982fcb97923955685fe9fa4e0e67cb238
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-remote-parse.c
src/journal-remote/journal-remote.c