commit d03a32a2cbe192dbf7bbf098ce2227d97d156390
parent 79331ba68b0e49e606df1109b4b077cee0157ba4
Author: Roberto E. Vargas Caballero <roberto.vargas@midokura.com>
Date: Tue, 22 Nov 2022 17:33:03 +0100
os9: Add NULL check in freefds()
As it is done in other free functions.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/os9/alloc.c b/src/os9/alloc.c
@@ -182,6 +182,9 @@ allocfds(void)
void
freefds(Fdset *fds)
{
+ if (!fds)
+ return;
+
lock(&fdspool.m);
fds->next = fdspool.list;
fdspool.list = fds;