summaryrefslogtreecommitdiffstats
path: root/src/net/validator.c
diff options
context:
space:
mode:
authorMichael Brown2015-07-15 14:43:58 +0200
committerMichael Brown2015-07-22 22:17:47 +0200
commitcbbd6b761ed315ab6df82f1434657ef76bb3e676 (patch)
treea241c73bb7bf7a94555c62e0c939da8ddac798da /src/net/validator.c
parent[xfer] Add xfer_check_order() utility function (diff)
downloadipxe-cbbd6b761ed315ab6df82f1434657ef76bb3e676.tar.gz
ipxe-cbbd6b761ed315ab6df82f1434657ef76bb3e676.tar.xz
ipxe-cbbd6b761ed315ab6df82f1434657ef76bb3e676.zip
[xferbuf] Generalise to handle umalloc()-based buffers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/validator.c')
-rw-r--r--src/net/validator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/validator.c b/src/net/validator.c
index a01269da..db968398 100644
--- a/src/net/validator.c
+++ b/src/net/validator.c
@@ -83,7 +83,7 @@ static void validator_free ( struct refcnt *refcnt ) {
DBGC2 ( validator, "VALIDATOR %p freed\n", validator );
x509_chain_put ( validator->chain );
ocsp_put ( validator->ocsp );
- xferbuf_done ( &validator->buffer );
+ xferbuf_free ( &validator->buffer );
free ( validator );
}
@@ -392,7 +392,7 @@ static void validator_xfer_close ( struct validator *validator, int rc ) {
goto err_append;
/* Free downloaded data */
- xferbuf_done ( &validator->buffer );
+ xferbuf_free ( &validator->buffer );
/* Resume validation process */
process_add ( &validator->process );
@@ -557,6 +557,7 @@ int create_validator ( struct interface *job, struct x509_chain *chain ) {
process_init ( &validator->process, &validator_process_desc,
&validator->refcnt );
validator->chain = x509_chain_get ( chain );
+ xferbuf_malloc_init ( &validator->buffer );
/* Attach parent interface, mortalise self, and return */
intf_plug_plug ( &validator->job, job );