summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-09-17 16:11:01 +1000
committerDamien Miller <djm@mindrot.org>2007-09-17 16:11:01 +1000
commit83e04f2023cb80366cf4f06a43f4df6ad2b5f08b (patch)
tree482cac77c11d376b8e81297f9d6f24d619de52c1
parent1235cd387e0fee0595129f0fa55216ab0d040c94 (diff)
- stevesk@cvs.openbsd.org 2007/09/12 19:39:19
[umac.c] use xmalloc() and xfree(); ok markus@ pvalchev@
-rw-r--r--ChangeLog5
-rw-r--r--umac.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 23145d7a..f0ae35d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,9 @@
[sshpty.c]
remove #if defined block not needed; ok markus@ dtucker@
NB. RCS ID sync only
+ - stevesk@cvs.openbsd.org 2007/09/12 19:39:19
+ [umac.c]
+ use xmalloc() and xfree(); ok markus@ pvalchev@
20070914
- (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path.
@@ -3246,4 +3249,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.4753 2007/09/17 06:10:21 djm Exp $
+$Id: ChangeLog,v 1.4754 2007/09/17 06:11:01 djm Exp $
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 <sys/types.h>
+#include "xmalloc.h"
#include "umac.h"
#include <string.h>
#include <stdlib.h>
@@ -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 -