summaryrefslogtreecommitdiff
path: root/debian/patches/0001-term-fix-memory-leak.patch
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-26 14:01:13 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-26 14:01:13 +0200
commit014461fef384771fa359cab675c25d197a3d8e68 (patch)
treed0d8d1b5fd4fdfa7540bbc5d36a73a23370ad408 /debian/patches/0001-term-fix-memory-leak.patch
parent2b512be2e9b7421d9b2c95a8cf1b87e0e2eee43e (diff)
add patch series
Diffstat (limited to 'debian/patches/0001-term-fix-memory-leak.patch')
-rw-r--r--debian/patches/0001-term-fix-memory-leak.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/0001-term-fix-memory-leak.patch b/debian/patches/0001-term-fix-memory-leak.patch
new file mode 100644
index 00000000..492e1ae9
--- /dev/null
+++ b/debian/patches/0001-term-fix-memory-leak.patch
@@ -0,0 +1,31 @@
+From 22f0bf426ae955c58edb835d6be7be44af5c029d Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 20 May 2014 16:17:17 +0200
+Subject: [PATCH 01/20] term: fix memory leak
+
+I tested this change for some days and have not experienced any
+problems with it.
+
+* term/users.c (pi_destroy_hook): Fix memory leak.
+---
+ term/users.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/term/users.c b/term/users.c
+index 97bc22c..9bd51d0 100644
+--- a/term/users.c
++++ b/term/users.c
+@@ -259,9 +259,7 @@ pi_destroy_hook (struct trivfs_protid *cred)
+ {
+ assert (((struct protid_hook *)cred->hook)->refcnt > 0);
+ if (--((struct protid_hook *)cred->hook)->refcnt == 0)
+- /* XXX don't free for now, so we can try and catch a multiple-freeing
+- bug. */
+- /* free (cred->hook) */;
++ free (cred->hook);
+ }
+ pthread_mutex_unlock (&global_lock);
+ }
+--
+2.0.0.rc2
+