diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-02-18 13:30:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 13:30:26 +0200 |
| commit | d30260ee9efa30d7aa72355fac5bc598acdab91a (patch) | |
| tree | 8e3e6285cc4e48072750fcf1420dd2445adc851e /lib/northbound_cli.c | |
| parent | 82451d0cc7b7a17f9b3b6cfec2009d45835010fb (diff) | |
| parent | 4da4b9d4f1e1a820909ec502e79b6c9ef2ed8dec (diff) | |
Merge pull request #8104 from qlyoung/fix-clang-sa-feb2021
lib: fix some misc SA warnings
Diffstat (limited to 'lib/northbound_cli.c')
| -rw-r--r-- | lib/northbound_cli.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index ad7dad5cb2..1416b758d8 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -600,7 +600,19 @@ void nb_cli_show_dnode_cmds(struct vty *vty, struct lyd_node *root, (*nb_node->cbs.cli_show_end)(vty, parent); } + /* + * There is a possible path in this macro that ends up + * dereferencing child->parent->parent. We just null checked + * child->parent by checking (ly_iter_next_up(child) != NULL) + * above. + * + * I am not sure whether it is possible for the other + * conditions within this macro guarding the problem + * dereference to be satisfied when child->parent == NULL. + */ +#ifndef __clang_analyzer__ LY_TREE_DFS_END(root, next, child); +#endif } } |
