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

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

uml: drivers/net_user.c memory leak fix



Perform memory cleanup on exit.  On receiving invalid 'pid' we still
should clean 'output' variable.

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 7fa38e7e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -228,7 +228,10 @@ static void change(char *dev, char *what, unsigned char *addr,
		       "buffer\n");

	pid = change_tramp(argv, output, output_len);
	if (pid < 0) return;
	if (pid < 0) {
		kfree(output);
		return;
	}

	if (output != NULL) {
		printk("%s", output);