Not much to say. Testing some slightly dirtier inputs; these pipelines
were crashing or returning incorrectly.
if (!node)
return EINVAL; /* Nothing to work with */
- *result = cage = pmalloc(sizeof(struct cache_cage));
- cage->refresh = NULL;
+ *result = cage = pzalloc(sizeof(struct cache_cage));
cage->fallback = node;
return 0;
refresh_success:
- *result = cage = pmalloc(sizeof(struct cache_cage));
+ *result = cage = pzalloc(sizeof(struct cache_cage));
cage->rpkiNotify = rpkiNotify;
cage->refresh = node;
cage->fallback = get_fallback(sias);
fnstack_push_map(&cert->map);
cert->x509 = certificate_load(cert->map.path);
- if (!cert->x509)
- return -EINVAL;
+ if (!cert->x509) {
+ error = -EINVAL;
+ goto end;
+ }
cert->type = get_certificate_type(cert);
error = certificate_validate_chain(cert);
void
resources_destroy(struct resources *resources)
{
+ if (resources == NULL)
+ return;
+
if (resources->ip4s != NULL)
res4_put(resources->ip4s);
if (resources->ip6s != NULL)