fix mem leak on error handling

Change-Id: I40d8e371c46184aa701fa676246201a9d8f6e27d
This commit is contained in:
Hyejin Kim 2013-03-09 11:28:54 +09:00 committed by Sungmin Choi
parent 74bd799ec2
commit 3f727c0ea3
1 changed files with 3 additions and 1 deletions

View File

@ -1472,6 +1472,8 @@ status_t Parcel::continueWrite(size_t desired)
if (objectsSize) {
objects = (size_t*)malloc(objectsSize*sizeof(size_t));
if (!objects) {
free(data);
mError = NO_MEMORY;
return NO_MEMORY;
}