CID
1463578: Resource leaks (RESOURCE_LEAK)
CID
1463575: Resource leaks (RESOURCE_LEAK)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12231)
return 0;
}
- aint = ASN1_INTEGER_new();
- if (aint == NULL || !ASN1_INTEGER_set(aint, value))
+ if ((aint = ASN1_INTEGER_new()) == NULL)
goto oom;
val = ASN1_TYPE_new();
- if (val == NULL) {
+ if (!ASN1_INTEGER_set(aint, value) || val == NULL) {
ASN1_INTEGER_free(aint);
goto oom;
}
return 1;
oom:
+ ASN1_OBJECT_free(type);
CMP_err("out of memory");
return 0;
}