From 83e04f2023cb80366cf4f06a43f4df6ad2b5f08b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 17 Sep 2007 16:11:01 +1000 Subject: - stevesk@cvs.openbsd.org 2007/09/12 19:39:19 [umac.c] use xmalloc() and xfree(); ok markus@ pvalchev@ --- umac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'umac.c') diff --git a/umac.c b/umac.c index c2fdcf44..ca5e08b3 100644 --- a/umac.c +++ b/umac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umac.c,v 1.1 2007/06/07 19:37:34 pvalchev Exp $ */ +/* $OpenBSD: umac.c,v 1.2 2007/09/12 19:39:19 stevesk Exp $ */ /* ----------------------------------------------------------------------- * * umac.c -- C Implementation UMAC Message Authentication @@ -66,6 +66,7 @@ #include "includes.h" #include +#include "xmalloc.h" #include "umac.h" #include #include @@ -1196,7 +1197,7 @@ int umac_delete(struct umac_ctx *ctx) if (ctx) { if (ALLOC_BOUNDARY) ctx = (struct umac_ctx *)ctx->free_ptr; - free(ctx); + xfree(ctx); } return (1); } @@ -1212,7 +1213,7 @@ struct umac_ctx *umac_new(u_char key[]) size_t bytes_to_add; aes_int_key prf_key; - octx = ctx = malloc(sizeof(*ctx) + ALLOC_BOUNDARY); + octx = ctx = xmalloc(sizeof(*ctx) + ALLOC_BOUNDARY); if (ctx) { if (ALLOC_BOUNDARY) { bytes_to_add = ALLOC_BOUNDARY - -- cgit v1.2.1