We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b537528 + d938aed commit a4fde2cCopy full SHA for a4fde2c
driver/others/memory.c
@@ -3214,14 +3214,18 @@ void blas_shutdown(void){
3214
#endif
3215
memory[pos].lock = 0;
3216
}
3217
- if (memory_overflowed)
+ if (memory_overflowed) {
3218
for (pos = 0; pos < NEW_BUFFERS; pos ++){
3219
newmemory[pos].addr = (void *)0;
3220
newmemory[pos].used = 0;
3221
#if defined(WHEREAMI) && !defined(USE_OPENMP)
3222
newmemory[pos].pos = -1;
3223
3224
newmemory[pos].lock = 0;
3225
+ }
3226
+ free(newmemory);
3227
+ newmemory = NULL;
3228
+ memory_overflowed = 0;
3229
3230
3231
UNLOCK_COMMAND(&alloc_lock);
0 commit comments