From: paco Date: Mon, 25 Jun 2018 14:47:15 +0000 (+0200) Subject: ldpd: null check (Coverity 1452317) X-Git-Tag: frr-6.1-dev~250^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0ef34ac51ad2d522daf18e5a2b6e1fa987cbb412;p=matthieu%2Ffrr.git ldpd: null check (Coverity 1452317) Signed-off-by: F. Aragon --- diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c index e5832c5086..4ef57f574a 100644 --- a/ldpd/ldp_vty_conf.c +++ b/ldpd/ldp_vty_conf.c @@ -89,6 +89,9 @@ struct cmd_node ldp_pseudowire_node = int ldp_get_address(const char *str, int *af, union ldpd_addr *addr) { + if (!str || !af || !addr) + return (-1); + memset(addr, 0, sizeof(*addr)); if (inet_pton(AF_INET, str, &addr->v4) == 1) {