[dev] New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Tue Oct 3 15:30:41 EDT 2017
Hi,
Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
5 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)
** CID 1457301: Resource leaks (RESOURCE_LEAK)
/ospfd/ospf_te.c: 1172 in ospf_mpls_te_lsa_new()
________________________________________________________________________________________________________
*** CID 1457301: Resource leaks (RESOURCE_LEAK)
/ospfd/ospf_te.c: 1172 in ospf_mpls_te_lsa_new()
1166 lsa_type = OSPF_OPAQUE_AREA_LSA;
1167 }
1168 tmp = SET_OPAQUE_LSID(OPAQUE_TYPE_INTER_AS_LSA, lp->instance);
1169 lsa_id.s_addr = htonl(tmp);
1170
1171 if (!ospf)
>>> CID 1457301: Resource leaks (RESOURCE_LEAK)
>>> Variable "s" going out of scope leaks the storage it points to.
1172 return NULL;
1173
1174 lsa_header_set(s, options, lsa_type, lsa_id, ospf->router_id);
1175 } else {
1176 options |= LSA_OPTIONS_GET(area); /* Get area default option */
1177 options |= LSA_OPTIONS_NSSA_GET(area);
** CID 1457300: Null pointer dereferences (FORWARD_NULL)
/ospfd/ospf_vty.c: 8730 in config_write_interface_one()
________________________________________________________________________________________________________
*** CID 1457300: Null pointer dereferences (FORWARD_NULL)
/ospfd/ospf_vty.c: 8730 in config_write_interface_one()
8724 vty_out(vty, " %s",
8725 inet_ntoa(rn->p.u.prefix4));
8726 vty_out(vty, "\n");
8727 }
8728
8729 /* Cryptographic Authentication Key print. */
>>> CID 1457300: Null pointer dereferences (FORWARD_NULL)
>>> Comparing "params" to null implies that "params" might be null.
8730 if (params && params->auth_crypt) {
8731 for (ALL_LIST_ELEMENTS_RO(params->auth_crypt,
8732 n2, ck)) {
8733 vty_out(vty,
8734 " ip ospf message-digest-key %d md5 %s",
8735 ck->key_id, ck->auth_key);
** CID 1457299: Resource leaks (RESOURCE_LEAK)
/ospfd/ospf_ri.c: 664 in ospf_router_info_lsa_originate1()
________________________________________________________________________________________________________
*** CID 1457299: Resource leaks (RESOURCE_LEAK)
/ospfd/ospf_ri.c: 664 in ospf_router_info_lsa_originate1()
658
659 /* Get ospf info */
660 top = ospf_lookup_by_vrf_id(vrf_id);
661 if (top == NULL) {
662 zlog_debug("%s: ospf instance not found for vrf id %u",
663 __PRETTY_FUNCTION__, vrf_id);
>>> CID 1457299: Resource leaks (RESOURCE_LEAK)
>>> Variable "new" going out of scope leaks the storage it points to.
664 return rc;
665 }
666
667 /* Install this LSA into LSDB. */
668 if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) {
669 zlog_warn(
** CID 1457298: Resource leaks (RESOURCE_LEAK)
/ospfd/ospf_network.c: 268 in ospf_sock_init()
________________________________________________________________________________________________________
*** CID 1457298: Resource leaks (RESOURCE_LEAK)
/ospfd/ospf_network.c: 268 in ospf_sock_init()
262 ospf->fd = ospf_sock;
263 out:
264 if (ospfd_privs.change(ZPRIVS_LOWER)) {
265 zlog_err("ospf_sock_init: could not lower privs, %s",
266 safe_strerror(errno));
267 }
>>> CID 1457298: Resource leaks (RESOURCE_LEAK)
>>> Handle variable "ospf_sock" going out of scope leaks the handle.
268 return ret;
** CID 1457297: (RESOURCE_LEAK)
/ospfd/ospf_zebra.c: 1140 in ospf_distribute_list_update()
/ospfd/ospf_zebra.c: 1144 in ospf_distribute_list_update()
________________________________________________________________________________________________________
*** CID 1457297: (RESOURCE_LEAK)
/ospfd/ospf_zebra.c: 1140 in ospf_distribute_list_update()
1134 args[0] = ospf;
1135 args[1] = (void *)((ptrdiff_t) type);
1136
1137 /* External info does not exist. */
1138 ext = ospf_external_lookup(type, instance);
1139 if (!ext || !(rt = EXTERNAL_INFO(ext)))
>>> CID 1457297: (RESOURCE_LEAK)
>>> Variable "args" going out of scope leaks the storage it points to.
1140 return;
1141
1142 /* If exists previously invoked thread, then let it continue. */
1143 if (ospf->t_distribute_update)
1144 return;
1145
/ospfd/ospf_zebra.c: 1144 in ospf_distribute_list_update()
1138 ext = ospf_external_lookup(type, instance);
1139 if (!ext || !(rt = EXTERNAL_INFO(ext)))
1140 return;
1141
1142 /* If exists previously invoked thread, then let it continue. */
1143 if (ospf->t_distribute_update)
>>> CID 1457297: (RESOURCE_LEAK)
>>> Variable "args" going out of scope leaks the storage it points to.
1144 return;
1145
1146 /* Set timer. */
1147 ospf->t_distribute_update = NULL;
1148 thread_add_timer_msec(master, ospf_distribute_list_update_timer,
1149 (void **)args, ospf->min_ls_interval,
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRa7dJ8klHLUFWVd2fqpS-2B-2FHaN43B-2FQ11ntcKmbKat2WeHs8691VOJpZofPkpp-2BRBqc-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJkqdubGAjnUVj52MZN51xhwXpcxOzKWZ8qFBEO9qE3b40wZ71auERPsiEfY8UtIAEB3NB4zHysE8Ie-2BiAEWx4DKCVxIqLzdKu1zovggu-2FTTCN8UObOXuKS4aqpRVrXX2kKieVLGUNogkP28Hke4Y99FBWTRVqeaTIp9BMhONC1tuw-3D-3D
To manage Coverity Scan email notifications for "frr at lists.nox.tf", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4lcTWm1Zma8LQDNpOYqrETKrqBiM18kcBcL8b08LzBPOYJYGySZ4Vv7d5QYcnSbGxl3QyORKgEmDxh-2BE2mj6dp1V4JSs2jbMZuLnEQJOW0Z0-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJkqdubGAjnUVj52MZN51xhwZQYQGz-2FKy2uyx5D84fqGf1tD2j9eaYLZ4zxrW1p-2B90qu0MqsafgImllxTeuDY2VmeByhPziaCy82Wkr9akCLQCoOiFcUItXccu5ZvHqZw0bEXB-2FEJuVgipXb3w9U8WD6CZ45U5BZkP2koeCbuheFDw-3D-3D
More information about the dev
mailing list