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

Commit 9a8beb93 authored by Vitaliy Ivanov's avatar Vitaliy Ivanov Committed by Linus Torvalds
Browse files

uml: drivers/slip_user.c memory leak fix



Do not free memory when you failed to allocate it.

Signed-off-by: default avatarVitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2fdf2130
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ static int slip_tramp(char **argv, int fd)
		       "buffer\n");
		os_kill_process(pid, 1);
		err = -ENOMEM;
		goto out_free;
		goto out_close;
	}

	close(fds[1]);
@@ -112,7 +112,6 @@ static int slip_tramp(char **argv, int fd)
	err = helper_wait(pid);
	close(fds[0]);

out_free:
	kfree(output);
	return err;