X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=ltt-context.c;fp=ltt-context.c;h=ff1ba2e1a3c5d8c18c68d8d17698022711dd5296;hb=8070f5c01e8e64ce52912dd4f27021c5d9e3dce2;hp=89e54bf80dd7980647018e63075b8692629ed601;hpb=f167620537b558f8fabd6912d4ea5c46a92cd877;p=lttng-modules.git diff --git a/ltt-context.c b/ltt-context.c index 89e54bf8..ff1ba2e1 100644 --- a/ltt-context.c +++ b/ltt-context.c @@ -47,6 +47,8 @@ void lttng_destroy_context(struct lttng_ctx *ctx) { int i; + if (!ctx) + return; for (i = 0; i < ctx->nr_fields; i++) { if (ctx->fields[i].destroy) ctx->fields[i].destroy(&ctx->fields[i]);