]> git.ipfire.org Git - thirdparty/pdns.git/commit
FDWrapper: Do not try to close negative file descriptors
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 29 Mar 2024 14:14:55 +0000 (15:14 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 29 Mar 2024 14:14:55 +0000 (15:14 +0100)
commitef1e068d55f2247ff416204cebbbb96063a175c2
treed40794fdf05dc69edc79fd40d22163b33895077a
parent2f7dc1ce669c10d632ef748ccad2bba11f5c3610
FDWrapper: Do not try to close negative file descriptors

It turns out that some of the BPF helper functions return
a negative `errno` value in case of failure, and since we
wrap the return value into a `FDWrapper` right away this
led to a warning from Valgrind about trying to close an
invalid file descriptor.
pdns/misc.hh