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.
1 parent ef1718b commit 99d27feCopy full SHA for 99d27fe
Python/tracemalloc.c
@@ -978,13 +978,14 @@ _PyTraceMalloc_Start(int max_nframe)
978
void
979
_PyTraceMalloc_Stop(void)
980
{
981
- if (!tracemalloc_config.tracing)
982
- return;
983
-
984
// Lock to synchronize with tracemalloc_free() which checks
985
// 'tracing' while holding the lock.
986
TABLES_LOCK();
987
+ if (!tracemalloc_config.tracing) {
+ goto done;
+ }
988
+
989
/* stop tracing Python memory allocations */
990
tracemalloc_config.tracing = 0;
991
@@ -1001,6 +1002,7 @@ _PyTraceMalloc_Stop(void)
1001
1002
raw_free(tracemalloc_traceback);
1003
tracemalloc_traceback = NULL;
1004
1005
+done:
1006
TABLES_UNLOCK();
1007
}
1008
0 commit comments