blob: 9c7b89b89b67cecee0a6c770e8b4381b5ea6dc27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From 4aaa192400ad02b5c1540b505e3d406d4878c247 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 04/11] term: fix memory leak
I hope someone fixed that bug.
* 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
|