diff options
author | pjd <pjd@FreeBSD.org> | 2012-07-01 16:26:07 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-07-01 16:26:07 +0000 |
commit | c34c233e835da97d5c970b8700571fd2ddfd0e52 (patch) | |
tree | 07c781c4e669c5a1efa6a6a42ee602ffba51405a /sbin/hastd | |
parent | 1a62bb322429c1e61662250887fdaf2659cfa436 (diff) | |
download | FreeBSD-src-c34c233e835da97d5c970b8700571fd2ddfd0e52.zip FreeBSD-src-c34c233e835da97d5c970b8700571fd2ddfd0e52.tar.gz |
Check if there is cmsg at all.
MFC after: 3 days
Diffstat (limited to 'sbin/hastd')
-rw-r--r-- | sbin/hastd/proto_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastd/proto_common.c b/sbin/hastd/proto_common.c index 59b1e39..843366b 100644 --- a/sbin/hastd/proto_common.c +++ b/sbin/hastd/proto_common.c @@ -181,7 +181,7 @@ proto_descriptor_recv(int sock, int *fdp) return (errno); cmsg = CMSG_FIRSTHDR(&msg); - if (cmsg->cmsg_level != SOL_SOCKET || + if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { return (EINVAL); } |