Patch "HID: hyperv: fix possible memory leak in mousevsc_probe()" 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

    HID: hyperv: fix possible memory leak in mousevsc_probe()

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:
     hid-hyperv-fix-possible-memory-leak-in-mousevsc_prob.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 f0a983a47813435b116a9ea42f7d9998ebd087ad
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Fri Oct 28 21:40:43 2022 +0800

    HID: hyperv: fix possible memory leak in mousevsc_probe()
    
    [ Upstream commit b5bcb94b0954a026bbd671741fdb00e7141f9c91 ]
    
    If hid_add_device() returns error, it should call hid_destroy_device()
    to free hid_dev which is allocated in hid_allocate_device().
    
    Fixes: 74c4fb058083 ("HID: hv_mouse: Properly add the hid device")
    Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu@xxxxxxxxxx>
    Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index 978ee2aab2d4..b7704dd6809d 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -498,7 +498,7 @@ static int mousevsc_probe(struct hv_device *device,
 
 	ret = hid_add_device(hid_dev);
 	if (ret)
-		goto probe_err1;
+		goto probe_err2;
 
 
 	ret = hid_parse(hid_dev);



[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