From e39f02217a8ec0eeee4a4179ab5b39d35e0575c6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 13 Apr 2008 17:33:27 +0200 Subject: libnetapi: don't to try to free NULL struct. Guenther (This used to be commit eb33d30d80ab2fe770e248f5b2a70a83a43dd156) --- source3/lib/netapi/netapi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index cb218f0ced..f15e5bf067 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/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) { -- cgit