Chameleon

Chameleon Commit Details

Date:2014-01-07 09:17:53 (5 years 10 months ago)
Author:Chuck Fry
Commit:2298
Parents: 2297
Message:AllocateMemoryRange: fix cppcheck detected memory leak
Changes:
M/branches/chucko/i386/libsaio/allocate.c

File differences

branches/chucko/i386/libsaio/allocate.c
4141
4242
4343
44
4544
4645
47
46
47
48
49
4850
51
4952
5053
5154
nameBuf = malloc(strlen(rangeName) + 1);
if (nameBuf == 0) return -1;
strcpy(nameBuf, rangeName);
buffer = malloc(2 * sizeof(uint32_t));
if (buffer == 0) return -1;
if (buffer == 0) {
free(nameBuf);
return -1;
}
strcpy(nameBuf, rangeName);
buffer[0] = start;
buffer[1] = length;

Archive Download the corresponding diff file

Revision: 2298