commit | 418823a3df867d9ff3ab657af26057541989bed0 | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Thu Sep 20 16:42:13 2018 +0200 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Thu Sep 20 16:42:13 2018 +0200 |
tree | ce5b9a91a7012406025f4d48142e47d14a89a395 | |
parent | aaf6d406cb55c8a798ab96cccb88d351ff665ab7 [diff] |
context CHANGE be silent about NULL ctx in ly_ctx_destroy() mimic free() behavior
diff --git a/src/context.c b/src/context.c index 465db73..d49b237 100644 --- a/src/context.c +++ b/src/context.c
@@ -267,7 +267,9 @@ API void ly_ctx_destroy(struct ly_ctx *ctx, void (*private_destructor)(const struct lysc_node *node, void *priv)) { - LY_CHECK_ARG_RET(ctx, ctx,); + if (!ctx) { + return; + } /* models list */ for (; ctx->list.count; ctx->list.count--) {