eigrpd: Clean up some new coverity issues

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-08-31 13:01:35 -04:00
parent 76260b3578
commit 21dfc9ed50

View File

@ -272,6 +272,7 @@ int eigrp_make_sha256_digest(struct eigrp_interface *ei, struct stream *s,
if (!key) { if (!key) {
zlog_warn("Interface %s: Expected key value not found in config", zlog_warn("Interface %s: Expected key value not found in config",
ei->ifp->name); ei->ifp->name);
eigrp_authTLV_SHA256_free(auth_TLV);
return 0; return 0;
} }
@ -622,8 +623,8 @@ int eigrp_read(struct thread *thread)
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV)) { if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV)) {
char src[PREFIX_STRLEN], dst[PREFIX_STRLEN]; char src[PREFIX_STRLEN], dst[PREFIX_STRLEN];
strncpy(src, inet_ntoa(iph->ip_src), PREFIX_STRLEN); strlcpy(src, inet_ntoa(iph->ip_src), sizeof(src));
strncpy(dst, inet_ntoa(iph->ip_dst), PREFIX_STRLEN); strlcpy(dst, inet_ntoa(iph->ip_dst), sizeof(dst));
zlog_debug("Received [%s][%d/%d] length [%u] via [%s] src [%s] dst [%s]", zlog_debug("Received [%s][%d/%d] length [%u] via [%s] src [%s] dst [%s]",
lookup_msg(eigrp_packet_type_str, opcode, NULL), lookup_msg(eigrp_packet_type_str, opcode, NULL),
ntohl(eigrph->sequence), ntohl(eigrph->ack), length, ntohl(eigrph->sequence), ntohl(eigrph->ack), length,