Merge "get_malloc_leak_info: Fix assumption that totalMemory out parameter was initialized to zero."
This commit is contained in:
@@ -120,6 +120,7 @@ void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
|
|||||||
totalMemory == NULL || backtraceSize == NULL) {
|
totalMemory == NULL || backtraceSize == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*totalMemory = 0;
|
||||||
|
|
||||||
pthread_mutex_lock(&gAllocationsMutex);
|
pthread_mutex_lock(&gAllocationsMutex);
|
||||||
|
|
||||||
@@ -127,7 +128,6 @@ void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
|
|||||||
*info = NULL;
|
*info = NULL;
|
||||||
*overallSize = 0;
|
*overallSize = 0;
|
||||||
*infoSize = 0;
|
*infoSize = 0;
|
||||||
*totalMemory = 0;
|
|
||||||
*backtraceSize = 0;
|
*backtraceSize = 0;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user