Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751262Ab3I1ER5 (ORCPT ); Sat, 28 Sep 2013 00:17:57 -0400 Received: from mail-vb0-f43.google.com ([209.85.212.43]:55462 "EHLO mail-vb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750875Ab3I1ERz (ORCPT ); Sat, 28 Sep 2013 00:17:55 -0400 MIME-Version: 1.0 In-Reply-To: <1380340311-4630-1-git-send-email-khoroshilov@ispras.ru> References: <1380340311-4630-1-git-send-email-khoroshilov@ispras.ru> Date: Sat, 28 Sep 2013 01:17:54 -0300 Message-ID: Subject: Re: [PATCH] carl9170: fix leaks at failure path in carl9170_usb_probe() From: Fabio Estevam To: Alexey Khoroshilov Cc: Christian Lamparter , "John W. Linville" , linux-wireless@vger.kernel.org, "netdev@vger.kernel.org" , linux-kernel , ldv-project@linuxtesting.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 743 Lines: 18 On Sat, Sep 28, 2013 at 12:51 AM, Alexey Khoroshilov wrote: > - return request_firmware_nowait(THIS_MODULE, 1, CARL9170FW_NAME, > + err = request_firmware_nowait(THIS_MODULE, 1, CARL9170FW_NAME, > &ar->udev->dev, GFP_KERNEL, ar, carl9170_usb_firmware_step2); > + if (err) { > + usb_put_dev(udev); > + usb_put_dev(udev); You are doing the same free twice. I guess you meant to also free: usb_put_dev(ar->udev) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/