certificates: Use shared destructor for x509_cdp_t
This commit is contained in:
@@ -108,15 +108,6 @@ static int read_serial(char *file, char *buf, int buflen)
|
||||
return serial.len;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy a CDP
|
||||
*/
|
||||
static void cdp_destroy(x509_cdp_t *this)
|
||||
{
|
||||
free(this->uri);
|
||||
free(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sign a CRL
|
||||
*/
|
||||
@@ -439,7 +430,7 @@ error:
|
||||
free(encoding.ptr);
|
||||
free(baseCrlNumber.ptr);
|
||||
list->destroy_function(list, (void*)revoked_destroy);
|
||||
cdps->destroy_function(cdps, (void*)cdp_destroy);
|
||||
cdps->destroy_function(cdps, (void*)x509_cdp_destroy);
|
||||
if (error)
|
||||
{
|
||||
fprintf(stderr, "%s\n", error);
|
||||
@@ -449,7 +440,7 @@ error:
|
||||
|
||||
usage:
|
||||
list->destroy_function(list, (void*)revoked_destroy);
|
||||
cdps->destroy_function(cdps, (void*)cdp_destroy);
|
||||
cdps->destroy_function(cdps, (void*)x509_cdp_destroy);
|
||||
return command_usage(error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user