1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

gensec: check for NULL gensec_security in gensec_security_by_auth_type().

We have equivalent checks in other gensec_security_by_X calls already.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Günther Deschner 2013-09-18 17:25:55 +02:00
parent d433ad077f
commit 4f979525e4

View File

@ -230,8 +230,10 @@ _PUBLIC_ const struct gensec_security_ops *gensec_security_by_auth_type(
}
backends = gensec_security_mechs(gensec_security, mem_ctx);
for (i=0; backends && backends[i]; i++) {
if (!gensec_security_ops_enabled(backends[i], gensec_security))
continue;
if (gensec_security != NULL &&
!gensec_security_ops_enabled(backends[i], gensec_security)) {
continue;
}
if (backends[i]->auth_type == auth_type) {
backend = backends[i];
talloc_free(mem_ctx);