From owner-svn-src-all@FreeBSD.ORG Wed Oct 9 13:28:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BFF2820B; Wed, 9 Oct 2013 13:28:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD1862677; Wed, 9 Oct 2013 13:28:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r99DSjGf086220; Wed, 9 Oct 2013 13:28:45 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r99DSjtS086219; Wed, 9 Oct 2013 13:28:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201310091328.r99DSjtS086219@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 9 Oct 2013 13:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256192 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 13:28:45 -0000 Author: trasz Date: Wed Oct 9 13:28:45 2013 New Revision: 256192 URL: http://svnweb.freebsd.org/changeset/base/256192 Log: Plug memory leaks. Coverity CID: 1087993, 1087992 Approved by: re (marius) Sponsored by: FreeBSD Foundation Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Wed Oct 9 12:30:52 2013 (r256191) +++ head/usr.sbin/ctld/login.c Wed Oct 9 13:28:45 2013 (r256192) @@ -419,8 +419,9 @@ login_send_chap_c(struct pdu *request, c keys_add(response_keys, "CHAP_C", chap_c); free(chap_c); keys_save(response_keys, response); - keys_delete(response_keys); pdu_send(response); + pdu_delete(response); + keys_delete(response_keys); } static struct pdu * @@ -558,6 +559,7 @@ login_send_chap_success(struct pdu *requ keys_delete(request_keys); pdu_send(response); + pdu_delete(response); } static void