@@ -386,9 +386,12 @@ cleanup_sync_class(void)
386
386
{
387
387
unsigned int i;
388
388
389
- for (i= 0 ; i<mutex_class_max; i++ )
389
+ if (mutex_class_array != NULL )
390
390
{
391
- my_free (mutex_class_array[i].m_documentation );
391
+ for (i=0 ; i<mutex_class_max; i++)
392
+ {
393
+ my_free (mutex_class_array[i].m_documentation );
394
+ }
392
395
}
393
396
394
397
PFS_FREE_ARRAY (&builtin_memory_mutex_class,
@@ -398,9 +401,12 @@ cleanup_sync_class(void)
398
401
mutex_class_array = NULL ;
399
402
mutex_class_dirty_count = mutex_class_allocated_count = mutex_class_max = 0 ;
400
403
401
- for (i= 0 ; i<rwlock_class_max; i++ )
404
+ if (rwlock_class_array != NULL )
402
405
{
403
- my_free (rwlock_class_array[i].m_documentation );
406
+ for (i=0 ; i<rwlock_class_max; i++)
407
+ {
408
+ my_free (rwlock_class_array[i].m_documentation );
409
+ }
404
410
}
405
411
406
412
PFS_FREE_ARRAY (&builtin_memory_rwlock_class,
@@ -411,9 +417,12 @@ cleanup_sync_class(void)
411
417
rwlock_class_dirty_count = rwlock_class_allocated_count = rwlock_class_max =
412
418
0 ;
413
419
414
- for (i= 0 ; i<cond_class_max; i++ )
420
+ if (cond_class_array != NULL )
415
421
{
416
- my_free (cond_class_array[i].m_documentation );
422
+ for (i=0 ; i<cond_class_max; i++)
423
+ {
424
+ my_free (cond_class_array[i].m_documentation );
425
+ }
417
426
}
418
427
419
428
PFS_FREE_ARRAY (&builtin_memory_cond_class,
@@ -463,9 +472,12 @@ cleanup_thread_class(void)
463
472
{
464
473
unsigned int i;
465
474
466
- for (i= 0 ; i<thread_class_max; i++ )
475
+ if (thread_class_array != NULL )
467
476
{
468
- my_free (thread_class_array[i].m_documentation );
477
+ for (i=0 ; i<thread_class_max; i++)
478
+ {
479
+ my_free (thread_class_array[i].m_documentation );
480
+ }
469
481
}
470
482
471
483
PFS_FREE_ARRAY (&builtin_memory_thread_class,
@@ -915,9 +927,12 @@ cleanup_file_class(void)
915
927
{
916
928
unsigned int i;
917
929
918
- for (i= 0 ; i<file_class_max; i++ )
930
+ if (file_class_array != NULL )
919
931
{
920
- my_free (file_class_array[i].m_documentation );
932
+ for (i=0 ; i<file_class_max; i++)
933
+ {
934
+ my_free (file_class_array[i].m_documentation );
935
+ }
921
936
}
922
937
923
938
PFS_FREE_ARRAY (&builtin_memory_file_class,
@@ -968,9 +983,12 @@ cleanup_stage_class(void)
968
983
{
969
984
unsigned int i;
970
985
971
- for (i= 0 ; i<stage_class_max; i++ )
986
+ if (stage_class_array != NULL )
972
987
{
973
- my_free (stage_class_array[i].m_documentation );
988
+ for (i=0 ; i<stage_class_max; i++)
989
+ {
990
+ my_free (stage_class_array[i].m_documentation );
991
+ }
974
992
}
975
993
976
994
PFS_FREE_ARRAY (&builtin_memory_stage_class,
@@ -1021,9 +1039,12 @@ cleanup_statement_class(void)
1021
1039
{
1022
1040
unsigned int i;
1023
1041
1024
- for (i= 0 ; i<statement_class_max; i++ )
1042
+ if (statement_class_array != NULL )
1025
1043
{
1026
- my_free (statement_class_array[i].m_documentation );
1044
+ for (i=0 ; i<statement_class_max; i++)
1045
+ {
1046
+ my_free (statement_class_array[i].m_documentation );
1047
+ }
1027
1048
}
1028
1049
1029
1050
PFS_FREE_ARRAY (&builtin_memory_statement_class,
@@ -1074,9 +1095,12 @@ cleanup_socket_class(void)
1074
1095
{
1075
1096
unsigned int i;
1076
1097
1077
- for (i= 0 ; i<socket_class_max; i++ )
1098
+ if (socket_class_array != NULL )
1078
1099
{
1079
- my_free (socket_class_array[i].m_documentation );
1100
+ for (i=0 ; i<socket_class_max; i++)
1101
+ {
1102
+ my_free (socket_class_array[i].m_documentation );
1103
+ }
1080
1104
}
1081
1105
1082
1106
PFS_FREE_ARRAY (&builtin_memory_socket_class,
@@ -1127,9 +1151,12 @@ cleanup_memory_class(void)
1127
1151
{
1128
1152
unsigned int i;
1129
1153
1130
- for (i= 0 ; i<memory_class_max; i++ )
1154
+ if (memory_class_array != NULL )
1131
1155
{
1132
- my_free (memory_class_array[i].m_documentation );
1156
+ for (i=0 ; i<memory_class_max; i++)
1157
+ {
1158
+ my_free (memory_class_array[i].m_documentation );
1159
+ }
1133
1160
}
1134
1161
1135
1162
PFS_FREE_ARRAY (&builtin_memory_memory_class,
0 commit comments