From patchwork Tue Dec 28 08:41:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Metzmacher X-Patchwork-Id: 435761 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBS8meb0027345 for ; Tue, 28 Dec 2010 08:48:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541Ab0L1IsM (ORCPT ); Tue, 28 Dec 2010 03:48:12 -0500 Received: from cc-smtpout2.netcologne.de ([89.1.8.212]:49761 "EHLO cc-smtpout2.netcologne.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752502Ab0L1IsL (ORCPT ); Tue, 28 Dec 2010 03:48:11 -0500 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id 21492127FD; Tue, 28 Dec 2010 09:41:43 +0100 (CET) Received: from localhost.localdomain (xdsl-78-34-105-125.netcologne.de [78.34.105.125]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id F108D11E7E; Tue, 28 Dec 2010 09:41:40 +0100 (CET) From: Stefan Metzmacher To: linux-cifs@vger.kernel.org Cc: Stefan Metzmacher Subject: [PATCH 1/3] cifs.upcall: fix memory and call krb5_auth_con_free() Date: Tue, 28 Dec 2010 09:41:31 +0100 Message-Id: <1293525693-11562-2-git-send-email-metze@samba.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1293525693-11562-1-git-send-email-metze@samba.org> References: <1293525693-11562-1-git-send-email-metze@samba.org> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 28 Dec 2010 08:48:40 +0000 (UTC) diff --git a/cifs.upcall.c b/cifs.upcall.c index 9b1436e..9116e56 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -313,13 +313,15 @@ cifs_krb5_get_req(const char *principal, const char *ccname, if (ret) { syslog(LOG_DEBUG, "%s: unable to get session key for %s", __func__, principal); - goto out_free_creds; + goto out_free_auth; } *mechtoken = data_blob(apreq_pkt.data, apreq_pkt.length); *sess_key = data_blob(KRB5_KEY_DATA(tokb), KRB5_KEY_LENGTH(tokb)); krb5_free_keyblock(context, tokb); +out_free_auth: + krb5_auth_con_free(context, auth_context); out_free_creds: krb5_free_creds(context, out_creds); out_free_principal: