[PATCH 1/1] nsproxy: free the old_ns on copy_namespaces error

From: Serge E . Hallyn
Date: Thu Aug 31 2006 - 07:54:15 EST


copy_namespaces increments the usage count on old_ns at top.
On successful exit it properly decrements that usage count.
On error path it failed to do so.

Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>
---
kernel/nsproxy.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index e25d97c..575155a 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -121,6 +121,7 @@ out_uts:
out_ns:
tsk->nsproxy = old_ns;
kfree(new_ns);
+ put_nsproxy(old_ns);
goto out;
}

--
1.4.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/