From eb33d30d80ab2fe770e248f5b2a70a83a43dd156 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Sun, 13 Apr 2008 17:33:27 +0200 Subject: [PATCH] libnetapi: don't to try to free NULL struct. Guenther --- source/lib/netapi/netapi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/lib/netapi/netapi.c b/source/lib/netapi/netapi.c index cb218f0ced7..f15e5bf067c 100644 --- a/source/lib/netapi/netapi.c +++ b/source/lib/netapi/netapi.c @@ -117,6 +117,10 @@ NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx) NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx) { + if (!ctx) { + return NET_API_STATUS_SUCCESS; + } + libnetapi_shutdown_cm(ctx); if (ctx->krb5_cc_env) { -- 2.47.3