Re: ia32 execve memory leak

From: Bjorn Helgaas <bjorn.helgaas_at_hp.com>
Date: 2003-08-27 06:43:51
On Friday 22 August 2003 12:17 pm, Arun Sharma wrote:
> The attached patch by Tony Luck fixes a memory leak in the ia32 execve 
> code path. Please apply to both 2.4 and 2.5.

I applied this for 2.4 as follows:

#### AUTHOR arun.sharma@intel.com
#### COMMENT START
### Comments for ChangeSet
ia64: fix memory leak in sys32_execve path

The attached patch by Tony Luck fixes a memory leak in the ia32 execve 
code path. Please apply to both 2.4 and 2.5.
### Comments for arch/ia64/ia32/sys_ia32.c
(sys32_execve): Fix memory leak.
#### COMMENT END

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1094  -> 1.1095 
#	arch/ia64/ia32/sys_ia32.c	1.36    -> 1.37   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/26	bjorn.helgaas@hp.com	1.1095
# fix mem leak
# --------------------------------------------
#
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c	Tue Aug 26 16:10:58 2003
+++ b/arch/ia64/ia32/sys_ia32.c	Tue Aug 26 16:10:58 2003
@@ -166,9 +166,9 @@
 		current->thread.map_base  = old_map_base;
 		current->thread.task_size = old_task_size;
 		set_fs(USER_DS);	/* establish new task-size as the address-limit */
-	  out:
-		kfree(av);
 	}
+  out:
+	kfree(av);
 	return r;
 }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Aug 26 16:46:50 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:17 EST