Patch "ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-usb-audio-fix-wrong-kfree-issue-in-snd_usb_endp.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e6c903d9f2cf00516280b571ba2b22d0b540663b
Author: Wan Jiabing <wanjiabing@xxxxxxxx>
Date:   Wed May 18 10:16:16 2022 +0800

    ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all
    
    [ Upstream commit 03a8b0df757f1beb21ba1626e23ca7412e48b525 ]
    
    Fix following coccicheck error:
    ./sound/usb/endpoint.c:1671:8-10: ERROR: reference preceded by free on line 1671.
    
    Here should be 'cp' rather than 'ip'.
    
    Fixes: c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock")
    Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx>
    Link: https://lore.kernel.org/r/20220518021617.10114-1-wanjiabing@xxxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 26af199f3836e..8188113ca83f2 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1720,7 +1720,7 @@ void snd_usb_endpoint_free_all(struct snd_usb_audio *chip)
 		kfree(ip);
 
 	list_for_each_entry_safe(cp, cn, &chip->clock_ref_list, list)
-		kfree(ip);
+		kfree(cp);
 }
 
 /*




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux