File tree 1 file changed +17
-10
lines changed
1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -188,11 +188,16 @@ TSRM_API void tsrm_shutdown(void)
188
188
next_p = p -> next ;
189
189
for (j = 0 ; j < p -> count ; j ++ ) {
190
190
if (p -> storage [j ]) {
191
- if (resource_types_table && !resource_types_table [j ].done && resource_types_table [j ].dtor ) {
192
- resource_types_table [j ].dtor (p -> storage [j ]);
193
- }
194
- if (!resource_types_table [j ].fast_offset ) {
195
- free (p -> storage [j ]);
191
+ if (resource_types_table ) {
192
+ if (!resource_types_table [j ].done ) {
193
+ if (resource_types_table [j ].dtor ) {
194
+ resource_types_table [j ].dtor (p -> storage [j ]);
195
+ }
196
+
197
+ if (!resource_types_table [j ].fast_offset ) {
198
+ free (p -> storage [j ]);
199
+ }
200
+ }
196
201
}
197
202
}
198
203
}
@@ -531,11 +536,13 @@ void ts_free_id(ts_rsrc_id id)
531
536
532
537
while (p ) {
533
538
if (p -> count > j && p -> storage [j ]) {
534
- if (resource_types_table && resource_types_table [j ].dtor ) {
535
- resource_types_table [j ].dtor (p -> storage [j ]);
536
- }
537
- if (!resource_types_table [j ].fast_offset ) {
538
- free (p -> storage [j ]);
539
+ if (resource_types_table ) {
540
+ if (resource_types_table [j ].dtor ) {
541
+ resource_types_table [j ].dtor (p -> storage [j ]);
542
+ }
543
+ if (!resource_types_table [j ].fast_offset ) {
544
+ free (p -> storage [j ]);
545
+ }
539
546
}
540
547
p -> storage [j ] = NULL ;
541
548
}
You can’t perform that action at this time.
0 commit comments