diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-12-09 09:57:28 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-12-09 09:57:28 -0300 |
| commit | 4e32d023cdf9fc5326b09ea6aa16d465bc948147 (patch) | |
| tree | 19842270dd483aee22fdcc3c2e91ed638b8d7981 /lib/yang.c | |
| parent | 866f48f2df2e9de260080f31edbde9f17622fc03 (diff) | |
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 22fe938e4c..a3e2a395d7 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); |
