[umac.c]
use xmalloc() and xfree(); ok markus@ pvalchev@
[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.
-/* $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
#include "includes.h"
#include <sys/types.h>
+#include "xmalloc.h"
#include "umac.h"
#include <string.h>
#include <stdlib.h>
if (ctx) {
if (ALLOC_BOUNDARY)
ctx = (struct umac_ctx *)ctx->free_ptr;
- free(ctx);
+ xfree(ctx);
}
return (1);
}
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 -