Browse Source

Merge pull request #851 from trapexit/fix

fix segv: zero out data structures
pull/854/head 2.32.1
trapexit 4 years ago
committed by GitHub
parent
commit
8a335d8a6e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      libfuse/lib/fuse.c

9
libfuse/lib/fuse.c

@ -1130,8 +1130,7 @@ queue_element_wakeup(struct fuse *f,
if(!qe->second_locked && qe->path2) if(!qe->second_locked && qe->path2)
{ {
err = try_get_path(f,qe->nodeid2,qe->name2,qe->path2,
qe->wnode2,true);
err = try_get_path(f,qe->nodeid2,qe->name2,qe->path2,qe->wnode2,true);
if(!err) if(!err)
qe->second_locked = true; qe->second_locked = true;
else if(err != -EAGAIN) else if(err != -EAGAIN)
@ -1256,7 +1255,7 @@ get_path_common(struct fuse *f,
err = try_get_path(f,nodeid,name,path,wnode,true); err = try_get_path(f,nodeid,name,path,wnode,true);
if(err == -EAGAIN) if(err == -EAGAIN)
{ {
struct lock_queue_element qe;
struct lock_queue_element qe = {0};
qe.nodeid1 = nodeid; qe.nodeid1 = nodeid;
qe.name1 = name; qe.name1 = name;
@ -1352,7 +1351,7 @@ get_path2(struct fuse *f,
path1,path2,wnode1,wnode2); path1,path2,wnode1,wnode2);
if(err == -EAGAIN) if(err == -EAGAIN)
{ {
struct lock_queue_element qe;
struct lock_queue_element qe = {0};
qe.nodeid1 = nodeid1; qe.nodeid1 = nodeid1;
qe.name1 = name1; qe.name1 = name1;
@ -1438,7 +1437,7 @@ forget_node(struct fuse *f,
*/ */
while(node->nlookup == nlookup && node->treelock) while(node->nlookup == nlookup && node->treelock)
{ {
struct lock_queue_element qe;
struct lock_queue_element qe = {0};
qe.nodeid1 = nodeid; qe.nodeid1 = nodeid;

Loading…
Cancel
Save