[PATCH] uml: close file descriptor leaks
Close two file descriptor leaks, one in the ubd driver and one to /proc/mounts. The ubd driver bug also leaked some vmalloc space. The /proc/mounts leak was a descriptor that was just never closed. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
730760e90a
commit
80c1374914
@@ -132,6 +132,9 @@ err:
|
||||
else if(found < 0)
|
||||
printf("read returned errno %d\n", -found);
|
||||
|
||||
out:
|
||||
close(fd);
|
||||
|
||||
return;
|
||||
|
||||
found:
|
||||
@@ -141,11 +144,12 @@ found:
|
||||
|
||||
if(strncmp(buf, "tmpfs", strlen("tmpfs"))){
|
||||
printf("not tmpfs\n");
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
printf("OK\n");
|
||||
default_tmpdir = "/dev/shm";
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user