Changeset 1080 in MondoRescue for branches/stable/mondo/src/common/libmondo-fork.c
- Timestamp:
- Jan 28, 2007, 7:04:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-fork.c
r1075 r1080 5 5 6 6 #include "my-stuff.h" 7 #include "mr_mem.h" 7 8 #include "mondostructures.h" 8 9 #include "libmondo-fork.h" … … 106 107 assert_string_is_neither_NULL_nor_zerolength(isofile); 107 108 assert_string_is_neither_NULL_nor_zerolength(logstub); 108 if (!(midway_call = malloc(1200))) { 109 fatal_error("Cannot malloc midway_call"); 110 } 111 if (!(ultimate_call = malloc(1200))) { 112 fatal_error("Cannot malloc ultimate_call"); 113 } 114 if (!(tmp = malloc(1200))) { 115 fatal_error("Cannot malloc tmp"); 116 } 117 if (!(command = malloc(1200))) { 118 fatal_error("Cannot malloc command"); 119 } 109 midway_call = mr_malloc(1200); 110 ultimate_call = mr_malloc(1200); 111 tmp = mr_malloc(1200); 112 command = mr_malloc(1200); 120 113 malloc_string(incoming); 121 114 malloc_string(old_stderr); … … 178 171 } 179 172 180 paranoid_free(midway_call);181 paranoid_free(ultimate_call);182 paranoid_free(tmp);183 paranoid_free(command);184 paranoid_free(incoming);185 paranoid_free(old_stderr);186 paranoid_free(cd_number_str);173 mr_free(midway_call); 174 mr_free(ultimate_call); 175 mr_free(tmp); 176 mr_free(command); 177 mr_free(incoming); 178 mr_free(old_stderr); 179 mr_free(cd_number_str); 187 180 /* 188 181 if (bkpinfo->backup_media_type == dvd && !bkpinfo->please_dont_eject_when_restoring) … … 424 417 tmp[0] = '\0'; 425 418 bufcap = 256L * 1024L; 426 if (!(buf = malloc(bufcap))) { 427 fatal_error("Failed to malloc() buf"); 428 } 419 buf = mr_malloc(bufcap); 429 420 430 421 if (direction == 'w') { … … 529 520 } 530 521 531 paranoid_free(buf);532 paranoid_free(tmp);522 mr_free(buf); 523 mr_free(tmp); 533 524 log_msg(3, "Successfully copied %ld bytes", bytes_written_out); 534 525 return (retval); … … 559 550 sprintf(command, "ntfsclone --force --save-image --overwrite %s %s", output_fname, input_device); 560 551 res = run_program_and_log_output(command, 5); 561 paranoid_free(command);552 mr_free(command); 562 553 unlink(output_fname); 563 554 return (res); … … 627 618 } 628 619 unlink(tempfile); 629 paranoid_free(command);630 paranoid_free(tempfile);631 paranoid_free(title);620 mr_free(command); 621 mr_free(tempfile); 622 mr_free(title); 632 623 return (res); 633 624 } … … 721 712 } 722 713 log_msg(3, "Parent res = %d", res); 723 paranoid_free(command);724 paranoid_free(title);714 mr_free(command); 715 mr_free(title); 725 716 return (res); 726 717 } … … 747 738 sprintf(command, "ntfsclone --force --restore-image --overwrite %s %s", output_device, input_fifo); 748 739 res = run_program_and_log_output(command, 5); 749 paranoid_free(command);740 mr_free(command); 750 741 return (res); 751 742 }
Note:
See TracChangeset
for help on using the changeset viewer.