Various memory and file resource cleanup after valgrind tests
This commit is contained in:
parent
78cd42c15d
commit
c2841d6e40
7 changed files with 17 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue