classification: avoid duplicate errors

pull/8288/head
Victor Julien 2 years ago
parent 7d46d4217f
commit f45914cd99

@ -397,9 +397,7 @@ static SCClassConfClasstype *SCClassConfAllocClasstype(uint16_t classtype_id,
return NULL;
memset(ct, 0, sizeof(SCClassConfClasstype));
if ( (ct->classtype = SCClassConfStringToLowercase(classtype)) == NULL) {
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
if ((ct->classtype = SCClassConfStringToLowercase(classtype)) == NULL) {
SCClassConfDeAllocClasstype(ct);
return NULL;
}

Loading…
Cancel
Save