]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/find.c
kes Implement bconsole memory command that prints current memory
[bacula/bacula] / bacula / src / findlib / find.c
index 121e37559c3d2ed4a7dc81c23c9db2d7baf551c9..e77b4d20947c995ce4fd6ef72f26c35306e59e9b 100644 (file)
@@ -1,14 +1,3 @@
-/*
- * Main routine for finding files on a file system.
- *  The heart of the work to find the files on the
- *    system is done in find_one.c. Here we have the
- *    higher level control as well as the matching
- *    routines for the new syntax Options resource.
- *
- *  Kern E. Sibbald, MM
- *
- *   Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ * Main routine for finding files on a file system.
+ *  The heart of the work to find the files on the
+ *    system is done in find_one.c. Here we have the
+ *    higher level control as well as the matching
+ *    routines for the new syntax Options resource.
+ *
+ *  Kern E. Sibbald, MM
+ *
+ *   Version $Id$
+ */
 
 
 #include "bacula.h"
@@ -187,6 +187,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt, bool t
             findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
             ff->flags |= fo->flags;
             ff->GZIP_level = fo->GZIP_level;
+            ff->strip_path = fo->strip_path;
             ff->fstypes = fo->fstype;
             ff->drivetypes = fo->drivetype;
             bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
@@ -410,10 +411,16 @@ static int our_callback(FF_PKT *ff, void *hpkt, bool top_level)
 int
 term_find_files(FF_PKT *ff)
 {
-  int hard_links;
+   int hard_links;
 
-  free_pool_memory(ff->sys_fname);
-  hard_links = term_find_one(ff);
-  free(ff);
-  return hard_links;
+   free_pool_memory(ff->sys_fname);
+   if (ff->fname_save) {
+      free_pool_memory(ff->fname_save);
+   }
+   if (ff->link_save) {
+      free_pool_memory(ff->link_save);
+   }
+   hard_links = term_find_one(ff);
+   free(ff);
+   return hard_links;
 }