From: Günther Deschner Date: Sun, 13 Apr 2008 15:33:27 +0000 (+0200) Subject: libnetapi: don't to try to free NULL struct. X-Git-Tag: samba-3.3.0pre1~2693 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb33d30d80ab2fe770e248f5b2a70a83a43dd156;p=thirdparty%2Fsamba.git libnetapi: don't to try to free NULL struct. Guenther --- 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) {