Changeset 2241 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-archive.c
- Timestamp:
- Jun 29, 2009, 7:19:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-archive.c
r2230 r2241 541 541 542 542 assert(bkpinfo != NULL); 543 malloc_string(last_filelist_number);544 545 543 mr_asprintf(&tmp, 546 544 "echo '%s' | tr -s ' ' '\n' | grep -E '^/dev/.*$' | tr -s '\n' ' ' | awk '{print $0\"\\n\";}'", … … 2035 2033 char *tmp = NULL; 2036 2034 char *bigfile_fname; 2037 char *sz_devfile ;2035 char *sz_devfile = NULL; 2038 2036 char *ntfsprog_fifo = NULL; 2039 2037 /*@ long *********************************************** */ … … 2055 2053 2056 2054 malloc_string(bigfile_fname); 2057 malloc_string(sz_devfile);2058 2055 estimated_total_noof_slices = 2059 2056 size_of_all_biggiefiles_K() / bkpinfo->optimal_set_size + 1; … … 2111 2108 "Calling ntfsclone in background because %s is an NTFS partition", 2112 2109 bigfile_fname); 2113 sprintf(sz_devfile, "%s/%d.%d.000",2110 mr_asprintf(&sz_devfile, "%s/%d.%d.000", 2114 2111 bkpinfo->tmpdir, 2115 2112 (int) (random() % 32768), … … 2119 2116 switch (pid = fork()) { 2120 2117 case -1: 2118 mr_free(sz_devfile); 2121 2119 fatal_error("Fork failure"); 2122 2120 case 0: … … 2125 2123 bigfile_fname, sz_devfile); 2126 2124 res = feed_into_ntfsprog(bigfile_fname, sz_devfile); 2125 /* BCO/BERLIOS Does the child need to unalocate memory as well ? 2126 paranoid_free(bigfile_fname); 2127 mr_free(sz_devfile); 2128 */ 2127 2129 exit(res); 2128 2130 break; … … 2131 2133 "feed_into_ntfsprog() called in background --- pid=%ld", 2132 2134 (long int) (pid)); 2135 mr_free(sz_devfile); 2133 2136 } 2134 2137 } 2135 2138 // Otherwise, use good old 'dd' and 'bzip2' 2136 2139 else { 2137 sz_devfile[0] = '\0';2138 2140 ntfsprog_fifo = NULL; 2139 2141 } … … 2188 2190 paranoid_fclose(fin); 2189 2191 paranoid_free(bigfile_fname); 2190 paranoid_free(sz_devfile);2191 2192 return (retval); 2192 2193 }
Note:
See TracChangeset
for help on using the changeset viewer.