diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2007-09-12 19:39:20 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2007-09-12 19:39:20 +0000 |
commit | 8cdc8a5dec35351a26d4d76e718cbd120593983c (patch) | |
tree | eda1b4ee304e9283b4ef5b12f69aab52d791f538 /usr.bin/ssh/umac.c | |
parent | 3f370fd393367a332ca7d1fa4a453e416ca21b90 (diff) |
use xmalloc() and xfree(); ok markus@ pvalchev@
Diffstat (limited to 'usr.bin/ssh/umac.c')
-rw-r--r-- | usr.bin/ssh/umac.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/umac.c b/usr.bin/ssh/umac.c index eaeff3c438e..003be0b13b8 100644 --- a/usr.bin/ssh/umac.c +++ b/usr.bin/ssh/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 <sys/types.h> #include <sys/endian.h> +#include "xmalloc.h" #include "umac.h" #include <string.h> #include <stdlib.h> @@ -1194,7 +1195,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); } @@ -1210,7 +1211,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 - |