This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
release the global struct *after* we've finished using it
[perl5.git] / lib / ExtUtils / t / Embed.t
index 269b20a..7a83c98 100644 (file)
@@ -204,13 +204,13 @@ int main(int argc, char **argv, char **env) {
 
     perl_free(my_perl);
 
-#ifdef PERL_GLOBAL_STRUCT
-    free_global_struct(plvarsp);
-#endif /* PERL_GLOBAL_STRUCT */
-
     my_puts("ok 8");
 
     PERL_SYS_TERM();
 
+#ifdef PERL_GLOBAL_STRUCT
+    free_global_struct(plvarsp);
+#endif /* PERL_GLOBAL_STRUCT */
+
     return 0;
 }