summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-12-29 23:51:30 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2003-12-29 23:51:30 -0800
commitb2e95563794f81a3b2ccbeffcb59af1090fa00ef (patch)
tree6780b2042ed19269a38bb4d28cfb83cfcc2d32e7 /fs/exec.c
parent9323e05910634427922251bf7e512024670fdee2 (diff)
parent1d0990ac31a9f7d9bca74dd5e8c846a7314a34d6 (diff)
Merge home.osdl.org:/home/torvalds/v2.5/linux
into home.osdl.org:/home/torvalds/v2.5/akpm
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 34c5697d1a3b..a0e769adec78 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1085,6 +1085,7 @@ int do_execve(char * filename,
struct linux_binprm bprm;
struct file *file;
int retval;
+ int i;
sched_balance_exec();
@@ -1153,7 +1154,11 @@ int do_execve(char * filename,
out:
/* Something went wrong, return the inode and free the argument pages*/
- free_arg_pages(&bprm);
+ for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
+ struct page * page = bprm.page[i];
+ if (page)
+ __free_page(page);
+ }
if (bprm.security)
security_bprm_free(&bprm);