From 55cebea7660aa4ee1ddc6e414295fd45c63e0af0 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Wed, 4 Sep 2002 22:01:28 +0000 Subject: [PATCH] (sec_vfprintf): free encoded data git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11393 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/security.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appl/ftp/ftp/security.c b/appl/ftp/ftp/security.c index ee63f9343..9b2a3534a 100644 --- a/appl/ftp/ftp/security.c +++ b/appl/ftp/ftp/security.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2001 Kungliga Tekniska Högskolan + * Copyright (c) 1998-2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -387,9 +387,11 @@ sec_vfprintf(FILE *f, const char *fmt, va_list ap) return -1; } if(base64_encode(enc, len, &buf) < 0){ + free(enc); printf("Out of memory base64-encoding.\n"); return -1; } + free(enc); #ifdef FTP_SERVER if(command_prot == prot_safe) fprintf(f, "631 %s\r\n", buf);