From owner-svn-src-head@freebsd.org Mon Sep 18 16:29:36 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 21214E1CB8A; Mon, 18 Sep 2017 16:29:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.161.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA92270726; Mon, 18 Sep 2017 16:29:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yw0-f172.google.com with SMTP id u11so727254ywh.7; Mon, 18 Sep 2017 09:29:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=onXPYrabmc2/opTMNq09CTP23xkm3OjokE2eHwEcuv0=; b=R1V6SS4MsPVrbavGdu1kg0nnBorFSpWmeW7DWnBkzgyQdtEIezHCQmlxRC+mQaIt21 ykgJVTPvEaVBDJZUB6Ok4DxfgRebnokmPEV45IF9u/zL6Tm2rUAEDCpYSjRq7z2SndUF +4bM+nsghOYVpBW+Br9C6/dq8AdiwKEHOBOE/yN1eAAz30RN3Ah/+kj0pA557ivnedbM wybzsbms1N+ZfBOXd9SqgylBCYwBhL3AdWv31XX64djUu+naMNjj9k52+mcgi0izX+xF 4MqjcFzACqTFgQ4ZDNAH563NALP5g8aQexnwxcSXUQfANLJ1E/kLBwbinXoiRGvBsGUh oyJQ== X-Gm-Message-State: AHPjjUgcweRlc28CVHr4dfDrAnVEvkOocOHCDFXp9Dvz+8Ofew5asR34 OXFmW/YiCeJaAMt0DRc= X-Received: by 10.37.111.135 with SMTP id k129mr13982203ybc.74.1505750853318; Mon, 18 Sep 2017 09:07:33 -0700 (PDT) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com. [209.85.223.170]) by smtp.gmail.com with ESMTPSA id z77sm3138693ywd.31.2017.09.18.09.07.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 09:07:33 -0700 (PDT) Received: by mail-io0-f170.google.com with SMTP id z187so3277508ioz.12; Mon, 18 Sep 2017 09:07:33 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCtRHFpv8So2jOm1WJkZbUgiLITXeiWsi6nMFq1+6Jvu3p5FCq6gfAytPOV7j0cZGSd8c4JboE/d2P0h7VdJ+I= X-Received: by 10.107.97.5 with SMTP id v5mr19967780iob.174.1505750852753; Mon, 18 Sep 2017 09:07:32 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.81.131 with HTTP; Mon, 18 Sep 2017 09:07:32 -0700 (PDT) In-Reply-To: <7527afaa-c983-a2dd-6a1c-a20bb1d03d7a@selasky.org> References: <201709172340.v8HNeGuP016998@repo.freebsd.org> <7527afaa-c983-a2dd-6a1c-a20bb1d03d7a@selasky.org> From: Conrad Meyer Date: Mon, 18 Sep 2017 09:07:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Hans Petter Selasky Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" 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 16:29:36 -0000 This was not introduced in this change. On Mon, Sep 18, 2017 at 8:05 AM, Hans Petter Selasky wrote: > 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