]> 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:14 +0000 (18:27 +0000)
commitb29776a5b0518264333c4e78afe6dcbe226ff273
treedaad8b6b07541d4b24b48147cea73b2a3f6c7d34
parente522eb63572ac8aed07afc09be0a99ab0de65abe
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