From 4eb662c7a03e11c57a64ea302f8cd76a4ec83c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 11 Dec 2008 05:06:34 +0000 Subject: [PATCH] free data on failure, cid#86 git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24140 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/build_auth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/krb5/build_auth.c b/lib/krb5/build_auth.c index bbf4f274a..ce0a905e9 100644 --- a/lib/krb5/build_auth.c +++ b/lib/krb5/build_auth.c @@ -81,12 +81,14 @@ make_etypelist(krb5_context context, ALLOC(*auth_data, 1); if (*auth_data == NULL) { + free(buf); krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); return ENOMEM; } ALLOC_SEQ(*auth_data, 1); if ((*auth_data)->val == NULL) { + free(*auth_data); free(buf); krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); return ENOMEM;