fix
authorMiklos Szeredi <miklos@szeredi.hu>
Tue, 15 Feb 2005 17:04:50 +0000 (17:04 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Tue, 15 Feb 2005 17:04:50 +0000 (17:04 +0000)
ChangeLog
lib/fuse.c

index 3444ee40d92c9d8bbfeead5c4103cb9a6f19e511..d1f73c3398414ee7060002cf0e7586b8d29add30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-02-15  Miklos Szeredi <miklos@szeredi.hu>
+
+       * libfuse: clean up some unitialized memory found with valgrind
+
 2005-02-10  Miklos Szeredi <miklos@szeredi.hu>
 
        * fusermount: set umask, otherwise /etc/mtab will have
index 104d6544ac53be549221ce8a2f7a5b4229519b1c..72fd59a02ac894b591a0d1cd3add4630a3d73e13 100644 (file)
@@ -1048,6 +1048,7 @@ static void do_open(struct fuse *f, struct fuse_in_header *in,
     struct fuse_open_out outarg;
     struct fuse_file_info fi;
 
+    memset(&outarg, 0, sizeof(outarg));
     memset(&fi, 0, sizeof(fi));
     fi.flags = arg->flags;
     res = -ENOENT;
@@ -1523,10 +1524,11 @@ static void do_opendir(struct fuse *f, struct fuse_in_header *in,
     struct fuse_dirhandle *dh;
 
     (void) arg;
-
+    memset(&outarg, 0, sizeof(outarg));
     res = -ENOMEM;
     dh = (struct fuse_dirhandle *) malloc(sizeof(struct fuse_dirhandle));
     if (dh != NULL) {
+        memset(dh, 0, sizeof(struct fuse_dirhandle));
         dh->fuse = f;
         dh->contents = NULL;
         dh->len = 0;