]> git.ipfire.org Git - thirdparty/asterisk.git/commit
astfd.c: Avoid calling fclose with NULL argument.
authorNaveen Albert <asterisk@phreaknet.org>
Tue, 24 Sep 2024 11:29:59 +0000 (07:29 -0400)
committerNaveen Albert <asterisk@phreaknet.org>
Wed, 25 Sep 2024 18:27:15 +0000 (18:27 +0000)
commite629961606cf55aef9a32bdcf851df512303d3d3
tree0a371a866b1d5525795a6d602d978416f10b17e5
parentf6db5171b270698f073ec3bb4211cbe434de510e
astfd.c: Avoid calling fclose with NULL argument.

Don't pass through a NULL argument to fclose, which is undefined
behavior, and instead return -1 and set errno appropriately. This
also avoids a compiler warning with glibc 2.38 and newer, as glibc
commit 71d9e0fe766a3c22a730995b9d024960970670af
added the nonnull attribute to this argument.

Resolves: #900
main/astfd.c