From patchwork Thu Jun 26 16:14:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 4428591 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CF268BEEAA for ; Thu, 26 Jun 2014 16:47:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD8F3201ED for ; Thu, 26 Jun 2014 16:47:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E69F6201BB for ; Thu, 26 Jun 2014 16:47:43 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0F5B326513C; Thu, 26 Jun 2014 18:47:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id A8ADF265010; Thu, 26 Jun 2014 18:40:19 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A5141265010; Thu, 26 Jun 2014 18:40:17 +0200 (CEST) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id A47212650FF for ; Thu, 26 Jun 2014 18:14:05 +0200 (CEST) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 87111AC2A for ; Thu, 26 Jun 2014 16:14:02 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Thu, 26 Jun 2014 18:14:02 +0200 Message-Id: <1403799242-20622-1-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 2.0.0 Subject: [alsa-devel] [PATCH] ALSA: usb-audio: Remove from list in snd_usb_endpoint_free() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP snd_usb_endpoint_free() deallocates the object but it doesn't unlink from the list. This is actually no problem in the current usage because all elements are freed at once, but it's more consistent to do a proper unlinking there. Reported-by: Julia Lawall Signed-off-by: Takashi Iwai --- This is a 3.17 material. sound/usb/endpoint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 114e3e7ff511..304f36bf29cb 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -1011,6 +1011,7 @@ void snd_usb_endpoint_free(struct list_head *head) struct snd_usb_endpoint *ep; ep = list_entry(head, struct snd_usb_endpoint, list); + list_del(head); kfree(ep); }