Fixed SIGSEGV on the recent sub-second timestamps.
authorlace <>
Sun, 1 Jan 2006 09:12:57 +0000 (09:12 +0000)
committerlace <>
Sun, 1 Jan 2006 09:12:57 +0000 (09:12 +0000)
src/client/fuse/op_readdir.c

index 6aceb66..16f920a 100644 (file)
@@ -53,14 +53,17 @@ struct stat stat;
 int errint;
 
                errint=capfuse_captive_file_info_object_to_stat(&stat,captive_file_info_object);
-               g_object_unref(captive_file_info_object);
-               if (errint)
+               if (errint) {
+                       g_object_unref(captive_file_info_object);
                        return errint;
+                       }
                errint=(*fill_dir)(
                                buf,    /* buf; opaque */
                                captive_file_info_object->p.name,       /* name */
                                &stat,  /* stbuf */
                                0);     /* off; operation mode 1 - <fuse.h>/(*readdir) */
+               /* WARNING: (*fill_dir) needs: *captive_file_info_object->p.name */
+               g_object_unref(captive_file_info_object);
                if (errint) {
                        /* FIXME: Is it right? Examples do so. */
                        break;