]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/sasl.c
ITS#8585 Fail ldap_result if handle is already bad
[openldap] / libraries / liblutil / sasl.c
index 88e2eedd4592937fc7d7aac007688556b95ad264..01ac055ce98f5182fc7d97bfaf4b0af8340596cc 100644 (file)
@@ -1,7 +1,16 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 2000-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2017 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 #include "portable.h"
@@ -20,6 +29,7 @@
 #endif
 
 #include <ldap.h>
+#include "ldap_pvt.h"
 #include "lutil_ldap.h"
 
 
@@ -39,6 +49,8 @@ lutil_sasl_freedefs(
        void *defaults )
 {
        lutilSASLdefaults *defs = defaults;
+
+       assert( defs != NULL );
        
        if (defs->mech) ber_memfree(defs->mech);
        if (defs->realm) ber_memfree(defs->realm);