Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59925838 authored by Matthias Urlichs's avatar Matthias Urlichs Committed by Greg Kroah-Hartman
Browse files

usbserial: Reference leak



A sufficiently-large number of USB serial devices causes a reference leak
when /proc/tty/drivers/usbserial is read.

Signed-Off-By: default avatarMatthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 05ff0e29
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -464,8 +464,10 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int
		length += sprintf (page+length, " path:%s", tmp);
			
		length += sprintf (page+length, "\n");
		if ((length + begin) > (off + count))
		if ((length + begin) > (off + count)) {
			usb_serial_put(serial);
			goto done;
		}
		if ((length + begin) < off) {
			begin += length;
			length = 0;