summaryrefslogtreecommitdiff
path: root/eigrpd/eigrp_reply.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-12-05 09:52:16 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-12-11 08:42:51 -0500
commit2fd89ed7fc4b935cc9afeb6848fb74c24f1f75cd (patch)
tree0da8b9e7403a773d7dc70e3af4a409cb61686550 /eigrpd/eigrp_reply.c
parent872ed4c7937b0f66d2bd01ffffe433132169c5e8 (diff)
eigrpd: Fixup some SA issues
1) strlen(buf) on an uninted value is the wrong thing to do we should be getting sizeof(buf) 2) tlv is not freed in this error case, so let's free it up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_reply.c')
-rw-r--r--eigrpd/eigrp_reply.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c
index 0ccffde72b..84396f0878 100644
--- a/eigrpd/eigrp_reply.c
+++ b/eigrpd/eigrp_reply.c
@@ -170,9 +170,11 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
*/
if (!dest) {
char buf[PREFIX_STRLEN];
+
zlog_err("%s: Received prefix %s which we do not know about",
__PRETTY_FUNCTION__,
- prefix2str(&dest_addr, buf, strlen(buf)));
+ prefix2str(&dest_addr, buf, sizeof(buf)));
+ eigrp_IPv4_InternalTLV_free(tlv);
continue;
}