diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-05 13:37:01 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-08 09:35:53 +0100 |
commit | 73bfd7be042cc63e7649242b377ad494bf74ea4b (patch) | |
tree | 36fb589c212165b2e387198f98599416b77c0ce6 /src/resolve/resolved-bus.c | |
parent | hwbd: 60-sensor.hwdb: Add Pipo W2Pro (diff) | |
download | systemd-73bfd7be042cc63e7649242b377ad494bf74ea4b.tar.xz systemd-73bfd7be042cc63e7649242b377ad494bf74ea4b.zip |
resolve: fix potential memleak and use-after-free
When stub stream is closed early, then queries associated to the stream
are freed. Previously, the timer event source for queries may not be
disabled, hence may be triggered with already freed query.
See also dns_stub_stream_complete().
Note that we usually not set NULL or zero when freeing simple objects.
But, here DnsQuery is large and complicated object, and the element may
be referenced in subsequent freeing process in the future. Hence, for
safety, let's set NULL to the pointer.
Diffstat (limited to 'src/resolve/resolved-bus.c')
0 files changed, 0 insertions, 0 deletions