Changeset 2307 in MondoRescue


Ignore:
Timestamp:
Jul 27, 2009, 8:57:38 PM (15 years ago)
Author:
Bruno Cornec
Message:

Fix a bug in mr_strcat with good test program now for 2.2.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/lib/mr_mem.c

    r2306 r2307  
    138138    } else {
    139139        mr_asprintf_int(&fmt2, line, file, "%s%s", *in, fmt);
    140         res = vasprintf(&p, fmt2, args);
     140        mr_free_int((void **)in,line,file);
     141        res = vasprintf(in, fmt2, args);
     142        if (res == -1) {
     143            mr_msg_int(1,line,file,"Unable to alloc memory in mr_strcat\nExiting...");
     144            mr_exit(-1,"Unable to alloc memory in mr_strcat");
     145        }
    141146        mr_free_int((void **)&fmt2,line,file);
    142         mr_free_int((void **)in,line,file);
    143         in = &p;
    144147    }
    145148    va_end(args);
Note: See TracChangeset for help on using the changeset viewer.