From patchwork Mon Nov 16 12:17:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Qilong X-Patchwork-Id: 325033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94234C844F6 for ; Mon, 16 Nov 2020 12:38:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6976220855 for ; Mon, 16 Nov 2020 12:38:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729345AbgKPMNi (ORCPT ); Mon, 16 Nov 2020 07:13:38 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:7918 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728150AbgKPMNh (ORCPT ); Mon, 16 Nov 2020 07:13:37 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CZSdv0V6qz6wPq; Mon, 16 Nov 2020 20:13:23 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 16 Nov 2020 20:13:30 +0800 From: Zhang Qilong To: , CC: Subject: [PATCH 0/2] usb: gadget: Fix two memleaks in error handling Date: Mon, 16 Nov 2020 20:17:08 +0800 Message-ID: <20201116121710.1546690-1-zhangqilong3@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This patch sets fix two memleaks before error returns. Zhang Qilong (2): usb: gadget: f_midi: Fix memleak in f_midi_alloc usb: gadget: Fix memleak in gadgetfs_fill_super drivers/usb/gadget/function/f_midi.c | 3 +++ drivers/usb/gadget/legacy/inode.c | 3 +++ 2 files changed, 6 insertions(+)