From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbcHHLsO (ORCPT ); Mon, 8 Aug 2016 07:48:14 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33023 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbcHHLsK (ORCPT ); Mon, 8 Aug 2016 07:48:10 -0400 Date: Mon, 8 Aug 2016 13:48:09 +0200 From: Johan Hovold To: Alexey Klimov Cc: linux-usb@vger.kernel.org, johan@kernel.org, stern@rowland.harvard.edu, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: serial: fix memleak on error path in usb-serial Message-ID: <20160808114809.GE10523@localhost> References: <1470620086-22677-1-git-send-email-klimov.linux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1470620086-22677-1-git-send-email-klimov.linux@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 08, 2016 at 02:34:46AM +0100, Alexey Klimov wrote: > udriver struct allocated by kzalloc() will not be freed > if usb_register() and next calls fail. This patch fixes this > by adding one more step with kfree(udriver) in error path. > > Cc: Alan Stern > Signed-off-by: Alexey Klimov Now applied, thanks. Johan