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/common/libmondo-files.c

    r2053 r2242  
    1010
    1111#include "my-stuff.h"
     12#include "mr_mem.h"
    1213#include "mondostructures.h"
    1314#include "libmondo-files.h"
     
    12211222    /*@ buffers *************** */
    12221223    char tmp[MAX_STR_LEN];
     1224    char *mds = NULL;
    12231225
    12241226    /*@ long long ************* */
     
    12471249    }
    12481250    if (scratchLL <= 1) {
     1251        mds = media_descriptor_string(bkpinfo->backup_media_type);
    12491252        sprintf(tmp,
    1250                 "Your backup will probably occupy a single %s. Maybe two.",
    1251                 media_descriptor_string(bkpinfo->backup_media_type));
     1253                "Your backup will probably occupy a single %s. Maybe two.", mds);
     1254        mr_free(mds);
    12521255    } else if (scratchLL > 4) {
    12531256        sprintf(tmp,
Note: See TracChangeset for help on using the changeset viewer.