Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5005117ybh; Tue, 6 Aug 2019 22:39:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8xvLUPNqIYLZObv1tHhSoGSpLDjEcnwZrNmFt/MsyBYXuRCX+ylq9WAkX+CE34sw1N6vJ X-Received: by 2002:a17:90a:5887:: with SMTP id j7mr6629074pji.136.1565156385217; Tue, 06 Aug 2019 22:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565156385; cv=none; d=google.com; s=arc-20160816; b=QRq3uVxmOwX298hdwU+vbv1Yehx4WhALjG5mwOjr7gyUNB0owOVia7M1HCNcTrbC2j nk3Z3dGdP3rtpatGIIRxvEMllxQxCMs/fMVr3DfeYuc2sFKTy8nf1iGX0IinTyJo4tCD qbXrV0xr+XF9GhrkgKkHgB9VUxoI/KkrVPeUQVxnw/eINwUqyP2hALPeTOgSKE76njy4 yDpcWAaQkpmwGL6V0dm2AQc6UqwLGEfZLX2zqo8Fh+DKBtA5AY+s4DCS40UPED1HhtqO vp79EomoQVR5sk4xg3Ch7/LSIKqb+vjUDG2togI7cEkIYJzwExv8EXRjWFu6mx+i+r/P mbhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=sQZ6LDoY/UE+LA1PCnED3sjjgX6yd77/xP24lQkC2dw=; b=rlHlfpQNB5DnaCdj0XS7afLvjumlwxVcxlqLO4bXWAySCbbMIoSWECWk1n/PUyBmxy 79+UbiDUoHII31kSI24Bmal0kkrDfC2teYQ/EaCRsWB0c3ATxa7vIrYJ+qJPtivb3DWz kd/iBszphnIa0NOHPs66gqhLHljOP4j/xV2YCkNiAsGdR2DFl3UxRs7UUa4PbyiPldyI jEJ5PGT4k7wU1IsB3k3GNK/4yJ7YEMdeVsqiwxaTpELaa3DD/r99CjNbsmHs/OFRLbfy 1sCUVK6YsigEOyapeTXPnVXhQXD6vtNgi+bEItVjA9jdeUGWx39znLneGzE3TW9wjvUC LUEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si45013563plk.364.2019.08.06.22.39.28; Tue, 06 Aug 2019 22:39:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727010AbfHGFil (ORCPT + 99 others); Wed, 7 Aug 2019 01:38:41 -0400 Received: from ajax.cs.uga.edu ([128.192.4.6]:44448 "EHLO ajax.cs.uga.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbfHGFii (ORCPT ); Wed, 7 Aug 2019 01:38:38 -0400 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (authenticated bits=0) by ajax.cs.uga.edu (8.14.4/8.14.4) with ESMTP id x775cYpo059292 (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 7 Aug 2019 01:38:35 -0400 Received: by mail-lf1-f41.google.com with SMTP id j17so9032374lfp.3 for ; Tue, 06 Aug 2019 22:38:35 -0700 (PDT) X-Gm-Message-State: APjAAAWgwneGhGtruqacsIsU6Q01h38tJyb1caQKc4JfrqciJyfsXEkZ ak+lBHvicNADDwn79lq+eh82V1qwAKPl1JMRv8o= X-Received: by 2002:a19:491d:: with SMTP id w29mr4833560lfa.149.1565156314615; Tue, 06 Aug 2019 22:38:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Wenwen Wang Date: Wed, 7 Aug 2019 01:37:58 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ALSA: usb-midi: fix a memory leak bug To: Takashi Iwai Cc: "moderated list:SOUND" , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , open list , Wenwen Wang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 7, 2019 at 1:31 AM Takashi Iwai wrote: > > On Wed, 07 Aug 2019 05:22:09 +0200, > Wenwen Wang wrote: > > > > In __snd_usbmidi_create(), a MIDI streaming interface structure is > > allocated through kzalloc() and the pointer is saved to 'umidi'. Later on, > > the endpoint structures are created by invoking > > snd_usbmidi_create_endpoints_midiman() or snd_usbmidi_create_endpoints(), > > depending on the type of the audio quirk type. However, if the creation > > fails, the allocated 'umidi' is not deallocated, leading to a memory leak > > bug. > > > > To fix the above issue, free 'umidi' before returning the error. > > > > Signed-off-by: Wenwen Wang > > It's again a false-positive report. The object is released > automatically by the destructor of its base snd_rawmidi object. Thanks for your response! Sorry for the false positives. :( Wenwen