summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-13 17:33:27 +0200
committerGünther Deschner <gd@samba.org>2008-04-13 17:39:29 +0200
commite39f02217a8ec0eeee4a4179ab5b39d35e0575c6 (patch)
tree25268d5187d816f27758e8621b0b3250e9814583 /source3/lib/netapi
parent3cd8c1befad6b46cb51e990de12a22aa914e0c4b (diff)
downloadsamba-e39f02217a8ec0eeee4a4179ab5b39d35e0575c6.tar.gz
samba-e39f02217a8ec0eeee4a4179ab5b39d35e0575c6.tar.bz2
samba-e39f02217a8ec0eeee4a4179ab5b39d35e0575c6.zip
libnetapi: don't to try to free NULL struct.
Guenther (This used to be commit eb33d30d80ab2fe770e248f5b2a70a83a43dd156)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/netapi.c4
1 files changed, 4 insertions, 0 deletions
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) {