Make sure that sync level vector is emptied.

This commit is contained in:
Jan Lindström 2015-03-18 06:25:10 +02:00
parent 99a2c061d7
commit c14d9c21f0
2 changed files with 2 additions and 0 deletions

View File

@ -1454,6 +1454,7 @@ sync_thread_level_arrays_free(void)
/* If this slot was allocated then free the slot memory too. */
if (slot->levels != NULL) {
slot->levels->elems.erase(slot->levels->elems.begin(),slot->levels->elems.end());
free(slot->levels);
slot->levels = NULL;
}

View File

@ -1580,6 +1580,7 @@ sync_thread_level_arrays_free(void)
/* If this slot was allocated then free the slot memory too. */
if (slot->levels != NULL) {
slot->levels->elems.erase(slot->levels->elems.begin(),slot->levels->elems.end());
free(slot->levels);
slot->levels = NULL;
}