fuse/fix-fuse-crash-problem-when-rm-node.patch
2019-09-30 10:39:10 -04:00

35 lines
1.1 KiB
Diff

From a17e9cd2c332084092888b3ee67a891ebcba2ac6 Mon Sep 17 00:00:00 2001
From: Shijie Luo <luoshijie1@huawei.com>
Date: Tue, 23 Jul 2019 19:12:56 +0000
Subject: [PATCH] fix fuse crash problem when rm node
When using fuse to mount a filesystem, there is a problem that
when running command "rm" to delete a file, fuse will crash.
This patch fixes the problem.
Signed-off-by: Shijie Luo <luoshijie1@huawei.com>
---
libfuse-fuse-2.9.7/lib/fuse.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libfuse-fuse-2.9.7/lib/fuse.c b/libfuse-fuse-2.9.7/lib/fuse.c
index 0913388..f9b6b07 100644
--- a/libfuse-fuse-2.9.7/lib/fuse.c
+++ b/libfuse-fuse-2.9.7/lib/fuse.c
@@ -720,10 +720,9 @@ static void unhash_name(struct fuse *f, struct node *node)
*nodep = node->name_next;
node->name_next = NULL;
unref_node(f, node->parent);
- if (node->name != node->inline_name) {
+ if (node->name != node->inline_name)
free(node->name);
- node->name = NULL;
- }
+ node->name = NULL;
node->parent = NULL;
f->name_table.use--;
--
1.8.3.1