Return -1 consistently if an error occurs.

MFC after:	1 week
This commit is contained in:
Michael Tuexen 2020-01-05 14:06:40 +00:00
parent 397b1c945f
commit 4b66d476b3

View File

@ -7131,7 +7131,7 @@ sctp_initiate_iterator(inp_func inpf,
SCTP_M_ITER);
if (it == NULL) {
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PCB, ENOMEM);
return (ENOMEM);
return (-1);
}
memset(it, 0, sizeof(*it));
it->function_assoc = af;