summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/spnego.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/spnego.c')
-rw-r--r--source3/libsmb/spnego.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c
index f6a66200bac..a2839578aef 100644
--- a/source3/libsmb/spnego.c
+++ b/source3/libsmb/spnego.c
@@ -48,6 +48,10 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
char *p_oid = NULL;
token->mechTypes =
SMB_REALLOC_ARRAY(token->mechTypes, const char *, i + 2);
+ if (!token->mechTypes) {
+ asn1->has_error = True;
+ return False;
+ }
asn1_read_OID(asn1, &p_oid);
token->mechTypes[i] = p_oid;
}