summaryrefslogtreecommitdiffstats
path: root/lib/yang.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-01-11 16:38:58 +0100
committerChristian Hopps <chopps@labn.net>2024-01-11 19:14:58 +0100
commit29f2a300a328974146230c320ef63d047a679e81 (patch)
tree58cedcb420b377c414315075bbdf0d6de5b2fe89 /lib/yang.c
parentMerge pull request #15098 from donaldsharp/lib_zebra_h_cleanup_2 (diff)
downloadfrr-29f2a300a328974146230c320ef63d047a679e81.tar.xz
frr-29f2a300a328974146230c320ef63d047a679e81.zip
lib: fix coverity issues
** CID 1575504: Insecure data handling (TAINTED_SCALAR) (maybe) ** CID 1575505: Integer handling issues (CONSTANT_EXPRESSION_RESULT) ** CID 1575506: Integer handling issues (CONSTANT_EXPRESSION_RESULT) ** CID 1575507: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/yang.c')
-rw-r--r--lib/yang.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/yang.c b/lib/yang.c
index 2860108d6..5b177f7fb 100644
--- a/lib/yang.c
+++ b/lib/yang.c
@@ -1143,8 +1143,7 @@ LY_ERR yang_lyd_trim_xpath(struct lyd_node **root, const char *xpath)
}
darr_free(remove);
- if (set)
- ly_set_free(set, NULL);
+ ly_set_free(set, NULL);
return LY_SUCCESS;
#endif