diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-12-09 13:57:28 +0100 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-12-09 13:57:28 +0100 |
commit | 4e32d023cdf9fc5326b09ea6aa16d465bc948147 (patch) | |
tree | 19842270dd483aee22fdcc3c2e91ed638b8d7981 /lib/yang.c | |
parent | lib: silently ignore duplicated values (diff) | |
download | frr-4e32d023cdf9fc5326b09ea6aa16d465bc948147.tar.xz frr-4e32d023cdf9fc5326b09ea6aa16d465bc948147.zip |
lib: prevent libyang abstraction memory leak
Call `ly_set_free()` on `YANG_ITER_STOP` as well.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'lib/yang.c')
-rw-r--r-- | lib/yang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yang.c b/lib/yang.c index 22fe938e4..a3e2a395d 100644 --- a/lib/yang.c +++ b/lib/yang.c @@ -468,7 +468,7 @@ void yang_dnode_iterate(yang_dnode_iter_cb cb, void *arg, dnode = set->set.d[i]; ret = (*cb)(dnode, arg); if (ret == YANG_ITER_STOP) - return; + break; } ly_set_free(set); |