Allow bad use of mud_get_fd()

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-10-21 08:37:53 +00:00
parent 1e7e8722ee
commit 7f5c063ffb

3
mud.c
View File

@@ -985,6 +985,9 @@ mud_create(struct sockaddr *addr)
int int
mud_get_fd(struct mud *mud) mud_get_fd(struct mud *mud)
{ {
if (!mud)
return -1;
return mud->fd; return mud->fd;
} }