diff options
author | David Lamparter <equinox@diac24.net> | 2019-06-12 22:39:18 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-06-13 13:35:33 +0200 |
commit | bb53f1bc6664c3ae3cac8a74014d708624490e65 (patch) | |
tree | 2c0019696e4e12ca90ea367d0cae78115a417c72 /ldpd/packet.c | |
parent | ospfd: fix clang-SA warning (diff) | |
download | frr-bb53f1bc6664c3ae3cac8a74014d708624490e65.tar.xz frr-bb53f1bc6664c3ae3cac8a74014d708624490e65.zip |
ldpd: fix clang-SA warning in packet reading
clang-SA thinks we can skip the SA but have something allocated in buf.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ldpd/packet.c')
-rw-r--r-- | ldpd/packet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index 8ca90841d..dfab30eeb 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -618,12 +618,17 @@ session_read(struct thread *thread) len -= msg_size; } free(buf); + buf = NULL; if (len != 0) { session_shutdown(nbr, S_BAD_PDU_LEN, 0, 0); return (0); } } + /* shouldn't happen, session_get_pdu should be > 0 if buf was + * allocated - but let's get rid of the SA warning. + */ + free(buf); return (0); } |