improve/fix build
[m6w6/ext-psi] / src / context.c
index ed26f8223214fb62c989e5ee8b57170a75771476..5585dfef4cca8bf6aee358ff5909963e5600c7c1 100644 (file)
@@ -2,6 +2,8 @@
 # include "config.h"
 #endif
 
+#include "php_psi_stdinc.h"
+
 #include "php.h"
 
 #ifdef HAVE_DIRENT_H
@@ -342,6 +344,12 @@ void PSI_ContextDtor(PSI_Context *C)
                }
                free(C->structs);
        }
+       if (C->unions) {
+               if (C->unions->list) {
+                       free(C->unions->list);
+               }
+               free(C->unions);
+       }
        if (C->enums) {
                if (C->enums->list) {
                        free(C->enums->list);