Various memory and file resource cleanup after valgrind tests

This commit is contained in:
Olof hagsand 2024-06-23 18:46:44 +02:00
parent 78cd42c15d
commit c2841d6e40
7 changed files with 17 additions and 12 deletions

View file

@ -380,11 +380,8 @@ yang_ref_dec(yang_stmt *ys)
{
int retval = -1;
if (ys->ys_ref <= 0){
clixon_err(OE_YANG, 0, "reference count is %d cannot decrement", ys->ys_ref);
goto done;
}
ys->ys_ref--;
if (ys->ys_ref > 0)
ys->ys_ref--;
retval = 0;
done:
return retval;