]> andersk Git - openssh.git/commitdiff
- stevesk@cvs.openbsd.org 2007/09/12 19:39:19
authordjm <djm>
Mon, 17 Sep 2007 06:11:01 +0000 (06:11 +0000)
committerdjm <djm>
Mon, 17 Sep 2007 06:11:01 +0000 (06:11 +0000)
     [umac.c]
     use xmalloc() and xfree(); ok markus@ pvalchev@

ChangeLog
umac.c

index 1dc15e4ceb0835c71cb73fcb3490c99244409b6d..6b7b8f8ca75cfbb5dd1064dd79a9ab715d10a5cc 100644 (file)
--- 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.
diff --git a/umac.c b/umac.c
index c2fdcf4485ce807f5daa71e21216d2902fd4ed4d..ca5e08b3e2671b4edb3770b4d2ff8da199bbd724 100644 (file)
--- 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 -
This page took 0.299498 seconds and 5 git commands to generate.