diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | openbsd-compat/bsd-poll.c | 11 |
2 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20140206 | ||
2 | - (dtucker) [openbsd-compat/bsd-poll.c] Don't bother checking for non-NULL | ||
3 | before freeing since free(NULL) is a no-op. ok djm. | ||
4 | |||
1 | 20140205 | 5 | 20140205 |
2 | - (djm) [sandbox-capsicum.c] Don't fatal if Capsicum is offered by | 6 | - (djm) [sandbox-capsicum.c] Don't fatal if Capsicum is offered by |
3 | headers/libc but not supported by the kernel. Patch from Loganaden | 7 | headers/libc but not supported by the kernel. Patch from Loganaden |
diff --git a/openbsd-compat/bsd-poll.c b/openbsd-compat/bsd-poll.c index c7ef82776..73a852480 100644 --- a/openbsd-compat/bsd-poll.c +++ b/openbsd-compat/bsd-poll.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bsd-poll.c,v 1.5 2013/11/08 10:12:58 dtucker Exp $ */ | 1 | /* $Id: bsd-poll.c,v 1.6 2014/02/05 23:44:13 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au). | 4 | * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au). |
@@ -109,12 +109,9 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | out: | 111 | out: |
112 | if (readfds != NULL) | 112 | free(readfds); |
113 | free(readfds); | 113 | free(writefds); |
114 | if (writefds != NULL) | 114 | free(exceptfds); |
115 | free(writefds); | ||
116 | if (exceptfds != NULL) | ||
117 | free(exceptfds); | ||
118 | if (ret == -1) | 115 | if (ret == -1) |
119 | errno = saved_errno; | 116 | errno = saved_errno; |
120 | return ret; | 117 | return ret; |