Merge "fix mem leak on error handling"
This commit is contained in:
commit
86b2ecdd31
@ -1472,6 +1472,8 @@ status_t Parcel::continueWrite(size_t desired)
|
|||||||
if (objectsSize) {
|
if (objectsSize) {
|
||||||
objects = (size_t*)malloc(objectsSize*sizeof(size_t));
|
objects = (size_t*)malloc(objectsSize*sizeof(size_t));
|
||||||
if (!objects) {
|
if (!objects) {
|
||||||
|
free(data);
|
||||||
|
|
||||||
mError = NO_MEMORY;
|
mError = NO_MEMORY;
|
||||||
return NO_MEMORY;
|
return NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user