blob: a7ea1aca42af7a259b1bc9a40ae8510538e190e8 (
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
31
32
33
34
35
36
37
38
|
From bd969cea69e46aa55cb844a9df94df1e51479020 Mon Sep 17 00:00:00 2001
From: Justus Winter <justus@gnupg.org>
Date: Fri, 3 Jun 2016 14:44:22 +0200
Subject: [PATCH hurd] nfs: fix memory leak
* nfs/cache.c (netfs_node_norefs): Free node in any case. Previously,
netfs_node_norefs would have been called a second time, when the
temporary reference was released again.
Amends: dd93fc4b.
---
nfs/cache.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/nfs/cache.c b/nfs/cache.c
index ecf3b11..0c1a473 100644
--- a/nfs/cache.c
+++ b/nfs/cache.c
@@ -146,12 +146,10 @@ netfs_node_norefs (struct node *np)
perror ("pthread_create");
}
}
- else
- {
- if (np->nn->dtrans == SYMLINK)
- free (np->nn->transarg.name);
- free (np);
- }
+
+ if (np->nn->dtrans == SYMLINK)
+ free (np->nn->transarg.name);
+ free (np);
}
/* When dropping soft refs, we simply remove the node from the
--
2.1.4
|