diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-04-17 23:59:47 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-04-18 18:16:19 +0200 |
commit | 68a63f60ae495823cc9cc6f4fe6caaaec2f1b670 (patch) | |
tree | 95ac39d26dc3106d0c056088c2718e4d2a3875de /pbrd | |
parent | pbrd: remove pbr-policy resource leak (diff) | |
download | frr-68a63f60ae495823cc9cc6f4fe6caaaec2f1b670.tar.xz frr-68a63f60ae495823cc9cc6f4fe6caaaec2f1b670.zip |
pbrd: remove potential null dereference
Coverity #1467832
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'pbrd')
-rw-r--r-- | pbrd/pbr_nht.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index 1ce8c2104..4a420c3e8 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -209,6 +209,13 @@ void pbr_nhgroup_add_cb(const char *name) struct nexthop_group_cmd *nhgc; nhgc = nhgc_find(name); + + if (!nhgc) { + DEBUGD(&pbr_dbg_nht, "%s: Could not find nhgc with name: %s\n", + __PRETTY_FUNCTION__, name); + return; + } + pnhgc = pbr_nht_add_group(name); DEBUGD(&pbr_dbg_nht, "%s: Added nexthop-group %s", __PRETTY_FUNCTION__, |