New Defects reported by Coverity Scan for freerangerouting/frr

scan-admin at coverity.com scan-admin at coverity.com
Fri Sep 18 19:14:16 UTC 2020


Hi,

Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.

1 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1465475:    (RESOURCE_LEAK)
/zebra/zebra_netns_id.c: 190 in zebra_ns_id_get()
/zebra/zebra_netns_id.c: 227 in zebra_ns_id_get()


________________________________________________________________________________________________________
*** CID 1465475:    (RESOURCE_LEAK)
/zebra/zebra_netns_id.c: 190 in zebra_ns_id_get()
184     	sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
185     	if (sock < 0) {
186     		flog_err_sys(EC_LIB_SOCKET, "netlink( %u) socket() error: %s",
187     			     sock, safe_strerror(errno));
188     		if (fd_param == -1)
189     			close(fd);
>>>     CID 1465475:    (RESOURCE_LEAK)
>>>     Handle variable "fd" going out of scope leaks the handle.
190     		return NS_UNKNOWN;
191     	}
192     	memset(&snl, 0, sizeof(snl));
193     	snl.nl_family = AF_NETLINK;
194     	snl.nl_groups = RTNLGRP_NSID;
195     	snl.nl_pid = 0; /* AUTO PID */
/zebra/zebra_netns_id.c: 227 in zebra_ns_id_get()
221     
222     	ret = send_receive(sock, nlh, seq, buf);
223     	if (ret < 0) {
224     		close(sock);
225     		if (fd_param == -1)
226     			close(fd);
>>>     CID 1465475:    (RESOURCE_LEAK)
>>>     Handle variable "fd" going out of scope leaks the handle.
227     		return NS_UNKNOWN;
228     	}
229     	nlh = (struct nlmsghdr *)buf;
230     
231     	/* message to analyse : NEWNSID response */
232     	ret = 0;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrtN2DGUU98GYhjd55wXsXtw53zRK70R0agdV-2Fb7c45-2BkxBoZjryQtr5SpUD80NNfE-3D-JsZ_O0IDF7c8sUs2B6kWTeWwAJZqriD5fgsfL8PAN30oQTyNeKUgtN02-2FXgii1XLeNGNljNZpsIxJxRXE1YCj3HPkthCMfNlue1X1yh3gXCxHIa0xjLcryBFr7Lq4g-2BQBm-2FcouLBBCZY4uJPLf1kBiRXfwMG6OnfxGN84XxZSxf0BNZK5sNPNAgMKgfg2r6mRxYbn6UYckOhbO1RlQh2xcsEcXkGIBk9aB-2BrOWKzZbp1HsM-3D




More information about the dev mailing list