From owner-svn-src-head@freebsd.org Mon Sep 18 15:08:11 2017 Return-Path: Delivered-To: svn-src-head@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 7EDB1E16764; Mon, 18 Sep 2017 15:08:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 46BE76C9FF; Mon, 18 Sep 2017 15:08:10 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id CD3C9260105; Mon, 18 Sep 2017 17:08:08 +0200 (CEST) Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <7527afaa-c983-a2dd-6a1c-a20bb1d03d7a@selasky.org> Date: Mon, 18 Sep 2017 17:05:40 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201709172340.v8HNeGuP016998@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:08:11 -0000 On 09/18/17 01:40, Conrad Meyer wrote: > device_get_children(dev, &children, &nchildren); > for (i = 0; i < nchildren; i++) { > if (children[i]) > - linsysfs_run_bus(children[i], dir, scsi, new_path, prefix); > + linsysfs_run_bus(children[i], dir, scsi, chardev, new_path, prefix); > } > if (new_path != path) > free(new_path, M_TEMP); > + free(chardevname, M_TEMP); > > return (1); 1) Return code from device_get_children() should be checked. 2) children pointer should be freed else there is a memory leak. --HPS