From owner-svn-src-all@freebsd.org Tue Sep 12 13:51:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AACFE0AAE9; Tue, 12 Sep 2017 13:51:19 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 058F872999; Tue, 12 Sep 2017 13:51:18 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8CDpIcB042021; Tue, 12 Sep 2017 13:51:18 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8CDpIOd042020; Tue, 12 Sep 2017 13:51:18 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201709121351.v8CDpIOd042020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 12 Sep 2017 13:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323496 - head/lib/libstand X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/lib/libstand X-SVN-Commit-Revision: 323496 X-SVN-Commit-Repository: base 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.23 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: Tue, 12 Sep 2017 13:51:19 -0000 Author: tsoome Date: Tue Sep 12 13:51:18 2017 New Revision: 323496 URL: https://svnweb.freebsd.org/changeset/base/323496 Log: libstand: tftp_open() can leak pkt on error The memory can be leaked if we will have pkt set and will get an error during tftp_open() processing. Differential Revision: https://reviews.freebsd.org/D12202 Modified: head/lib/libstand/tftp.c Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Tue Sep 12 13:47:54 2017 (r323495) +++ head/lib/libstand/tftp.c Tue Sep 12 13:51:18 2017 (r323496) @@ -467,6 +467,7 @@ tftp_open(const char *path, struct open_file *f) if (res) { free(tftpfile->path); + free(tftpfile->pkt); free(tftpfile); return (res); }