ICU-6666 Free buffer to avoid memory leak.

X-SVN-Rev: 25558
This commit is contained in:
Michael Ow 2009-03-12 16:22:21 +00:00
parent 53a464d82a
commit 20f32241a0

View File

@ -932,6 +932,9 @@ expandCompositCharAtBegin(UChar *dest, int32_t sourceLength, int32_t destSize,UE
j--;
}
uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR);
uprv_free(tempbuffer);
destSize = sourceLength;
return destSize;
}
@ -998,6 +1001,8 @@ expandCompositCharAtEnd(UChar *dest, int32_t sourceLength, int32_t destSize,UErr
}
uprv_memcpy(dest, tempbuffer, sourceLength*U_SIZEOF_UCHAR);
uprv_free(tempbuffer);
destSize = sourceLength;
return destSize;
}