netlink: initialise error in nl_autobind_port().

CID:		1498877
MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2023-02-18 17:18:57 +00:00
parent 3f70fca90f
commit 4404e840cf

View File

@ -384,7 +384,7 @@ nl_autobind_port(struct nlpcb *nlp, uint32_t candidate_id)
uint32_t port_id = candidate_id;
NLCTL_TRACKER;
bool exist;
int error;
int error = EADDRINUSE;
for (int i = 0; i < 10; i++) {
NL_LOG(LOG_DEBUG3, "socket %p, trying to assign port %d", nlp->nl_socket, port_id);