All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Kangjie Lu <kjlu@umn.edu>
Cc: usb-storage@lists.one-eyed-alien.net,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	kbuild-all@01.org, pakki001@umn.edu
Subject: usb: sierra: fix a missing check of device_create_file
Date: Tue, 26 Mar 2019 11:23:20 +0300	[thread overview]
Message-ID: <20190326082320.GG32613@kadam> (raw)

On Tue, Mar 26, 2019 at 11:18:31AM +0300, Dan Carpenter wrote:
> 32fe5e393 Kevin Lloyd  2008-07-10  193  		}
> 32fe5e393 Kevin Lloyd  2008-07-10  194  		kfree(swocInfo);
>                                                         ^^^^^^^^^^^^^^^^
> 
> 32fe5e393 Kevin Lloyd  2008-07-10  195  	}
> 
> break statement?

Sorry, for some reason I saw "complete:" and read "default:". :/

But the warning seems valid.

regards,
dan carpenter

> 
> 32fe5e393 Kevin Lloyd  2008-07-10  196  complete:
> 32fe5e393 Kevin Lloyd  2008-07-10  197  	result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);
> 04d66f3d0 Kangjie Lu   2019-03-24  198  	if (result) {
> 04d66f3d0 Kangjie Lu   2019-03-24 @199  		kfree(swocInfo);
>                                                         ^^^^^^^^^^^^^^^
> Double free.
>

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Kangjie Lu <kjlu@umn.edu>
Cc: usb-storage@lists.one-eyed-alien.net,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	kbuild-all@01.org, pakki001@umn.edu
Subject: Re: [kbuild] [PATCH] usb: sierra: fix a missing check of device_create_file
Date: Tue, 26 Mar 2019 11:23:20 +0300	[thread overview]
Message-ID: <20190326082320.GG32613@kadam> (raw)
In-Reply-To: <20190326081831.GF32613@kadam>

On Tue, Mar 26, 2019 at 11:18:31AM +0300, Dan Carpenter wrote:
> 32fe5e393 Kevin Lloyd  2008-07-10  193  		}
> 32fe5e393 Kevin Lloyd  2008-07-10  194  		kfree(swocInfo);
>                                                         ^^^^^^^^^^^^^^^^
> 
> 32fe5e393 Kevin Lloyd  2008-07-10  195  	}
> 
> break statement?

Sorry, for some reason I saw "complete:" and read "default:". :/

But the warning seems valid.

regards,
dan carpenter

> 
> 32fe5e393 Kevin Lloyd  2008-07-10  196  complete:
> 32fe5e393 Kevin Lloyd  2008-07-10  197  	result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);
> 04d66f3d0 Kangjie Lu   2019-03-24  198  	if (result) {
> 04d66f3d0 Kangjie Lu   2019-03-24 @199  		kfree(swocInfo);
>                                                         ^^^^^^^^^^^^^^^
> Double free.
> 


             reply	other threads:[~2019-03-26  8:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26  8:23 Dan Carpenter [this message]
2019-03-26  8:23 ` [kbuild] [PATCH] usb: sierra: fix a missing check of device_create_file Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2019-03-26  8:18 Dan Carpenter
2019-03-26  8:18 ` [PATCH] " Dan Carpenter
2019-03-25 14:15 [v2] " Alan Stern
2019-03-25 14:15 ` [PATCH v2] " Alan Stern
2019-03-25  3:08 [v2] " Kangjie Lu
2019-03-25  3:08 ` [PATCH v2] " Kangjie Lu
2019-03-25  2:47 kbuild test robot
2019-03-25  2:47 ` [PATCH] " kbuild test robot
2019-03-24 22:39 Kangjie Lu
2019-03-24 22:39 ` [PATCH] " Kangjie Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190326082320.GG32613@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=kbuild@01.org \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pakki001@umn.edu \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.