diff options
-rw-r--r-- | lib/libutil/imsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libutil/imsg.c b/lib/libutil/imsg.c index 05e57c7e2d4..b506297b73f 100644 --- a/lib/libutil/imsg.c +++ b/lib/libutil/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.2 2012/06/02 21:46:53 gilles Exp $ */ +/* $OpenBSD: imsg.c,v 1.3 2012/12/19 13:37:12 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -103,7 +103,7 @@ again: (char *)CMSG_DATA(cmsg)) / sizeof(int); for (i = 0; i < j; i++) { fd = ((int *)CMSG_DATA(cmsg))[i]; - if (i == 0) { + if (ifd != NULL) { ifd->fd = fd; TAILQ_INSERT_TAIL(&ibuf->fds, ifd, entry); |