Ignore:
Timestamp:
Jun 29, 2009, 7:19:18 PM (15 years ago)
Author:
Bruno Cornec
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/common/libmondo-verify.c

    r2230 r2242  
    152152    /*@ buffers ********************************************************* */
    153153    char *tmp;
     154    char *mds = NULL;
    154155
    155156    /*@ int ************************************************************* */
     
    183184        }
    184185    }
    185     sprintf(tmp, "Verifying %s #%d's tarballs",
    186             media_descriptor_string(bkpinfo->backup_media_type),
    187             g_current_media_number);
     186    mds = media_descriptor_string(bkpinfo->backup_media_type);
     187    sprintf(tmp, "Verifying %s #%d's tarballs", mds, g_current_media_number);
     188    mr_free(mds);
     189
    188190    open_evalcall_form(tmp);
    189191
     
    229231//  char ca, cb;
    230232    char *command;
     233    char *mds = NULL;
    231234    char *sz_exe;
    232235    static char *bufblkA = NULL;
     
    282285
    283286    log_it("before vsbf");
    284     sprintf(tmp, "Verifying %s#%d's big files",
    285             media_descriptor_string(bkpinfo->backup_media_type),
    286             g_current_media_number);
     287    mds = media_descriptor_string(bkpinfo->backup_media_type);
     288    sprintf(tmp, "Verifying %s#%d's big files", mds, g_current_media_number);
     289    mr_free(mds);
     290
    287291    open_evalcall_form(tmp);
    288292    log_it("after vsbf");
Note: See TracChangeset for help on using the changeset viewer.