Skip to content

Commit

Permalink
[PATCH] alloc_fdtable() cleanup
Browse files Browse the repository at this point in the history
free_fdset(NULL, ...) is legal.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Sep 27, 2006
1 parent 07563c7 commit 8b0e330
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,8 @@ static struct fdtable *alloc_fdtable(int nr)
out2:
nfds = fdt->max_fdset;
out:
if (new_openset)
free_fdset(new_openset, nfds);
if (new_execset)
free_fdset(new_execset, nfds);
free_fdset(new_openset, nfds);
free_fdset(new_execset, nfds);
kfree(fdt);
return NULL;
}
Expand Down

0 comments on commit 8b0e330

Please sign in to comment.