Ignore:
Timestamp:
Jun 29, 2009, 7:19:18 PM (10 years ago)
Author:
bruno
Message:

r3145@localhost: bruno | 2009-06-29 17:18:58 +0200

  • Remove 2 memory leaks and change the behavoir for function media_descriptor_string which now allocates the string it returns (which needs to be free by the caller)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/mondorestore/mondo-rstr-compare.c

    r2230 r2242  
    382382
    383383    char *tarball_fname, *progress_str, *tmp;
     384    char *mds = NULL;
    384385    long max_val;
    385386
     
    393394
    394395    max_val = atol(tmp);
    395     sprintf(progress_str, "Comparing with %s #%d ",
    396             media_descriptor_string(bkpinfo->backup_media_type),
    397             g_current_media_number);
     396    mds = media_descriptor_string(bkpinfo->backup_media_type);
     397    sprintf(progress_str, "Comparing with %s #%d ", mds, g_current_media_number);
    398398
    399399    open_progress_form("Comparing files",
     
    440440            log_msg(2, "OK, I think it's time for another CD...");
    441441            g_current_media_number++;
    442             sprintf(progress_str, "Comparing with %s #%d ",
    443                     media_descriptor_string(bkpinfo->backup_media_type),
    444                     g_current_media_number);
     442            sprintf(progress_str, "Comparing with %s #%d ", mds, g_current_media_number);
    445443            log_to_screen(progress_str);
    446444        } else {
     
    451449        }
    452450    }
     451    mr_free(mds);
     452
    453453    close_progress_form();
    454454    if (retval) {
Note: See TracChangeset for help on using the changeset viewer.