-fix leak
authorChristian Grothoff <christian@grothoff.org>
Mon, 13 Feb 2012 14:54:37 +0000 (14:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 13 Feb 2012 14:54:37 +0000 (14:54 +0000)
src/fs/gnunet-helper-fs-publish.c

index 46460248d1af869c66386ebfaa6eabfe900515b1..9594c19c2b2588f05dabe65ed2f37b0da7a6280a 100644 (file)
@@ -308,15 +308,14 @@ preprocess_file (const char *filename,
     GNUNET_DISK_directory_scan (filename, 
                                &scan_callback, 
                                &rc);    
-    if (rc.stop == GNUNET_YES) 
+    if ( (rc.stop == GNUNET_YES) ||
+        (GNUNET_OK !=
+         write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY,
+                        "..", 3)) )
     {
       free_tree (item);
       return GNUNET_SYSERR;
     }
-    if (GNUNET_OK !=
-       write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY,
-                      "..", 3))
-      return GNUNET_SYSERR;
   }
   *dst = item;
   return GNUNET_OK;