fix leaks
[m6w6/ext-psi] / src / module.c
index 338f9451f0104981f6b616898b1d3519cba51cae..0aba56448cd92738eddca507672255f38498b5c3 100644 (file)
@@ -232,7 +232,7 @@ static PHP_FUNCTION(psi_validate)
        psi_validate_scope_dtor(&S);
        psi_data_dtor(&D);
        psi_parser_dtor(&P);
-       free(I);
+       psi_parser_input_free(&I);
 }
 
 ZEND_BEGIN_ARG_INFO_EX(ai_psi_validate_string, 0, 0, 1)
@@ -284,7 +284,7 @@ static PHP_FUNCTION(psi_validate_string)
        psi_validate_scope_dtor(&S);
        psi_data_dtor(&D);
        psi_parser_dtor(&P);
-       free(I);
+       psi_parser_input_free(&I);
 }
 
 static ZEND_RESULT_CODE psi_ops_load()