Skip to content

Commit a554434

Browse files
Humblesawmichalvasko
authored andcommitted
diff BUGFIX free diff if error occured
1 parent effdc25 commit a554434

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/diff.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,10 @@ lyd_diff_siblings_r(const struct lyd_node *first, const struct lyd_node *second,
13621362
LY_ARRAY_FREE(userord[u].inst);
13631363
}
13641364
LY_ARRAY_FREE(userord);
1365+
if (rc) {
1366+
lyd_free_siblings(*diff);
1367+
*diff = NULL;
1368+
}
13651369
return rc;
13661370
}
13671371

0 commit comments

Comments
 (0)