destroying parser on parse error
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Mar 2006 17:06:33 +0000 (17:06 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Mar 2006 17:06:33 +0000 (17:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3397 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/apachemods/mod_xmlent.c

index 1e3fa01..b9570be 100644 (file)
@@ -235,10 +235,12 @@ static int xmlEntHandler( ap_filter_t *f, apr_bucket_brigade *brigade ) {
                        if ( XML_Parse(ctx->parser, data, len, 0) == XML_STATUS_ERROR ) {
 
                                /* log and die on XML errors */
-                               ap_log_rerror( APLOG_MARK, APLOG_ERR, 0, f->r, "%s at line %d\n",
+                               ap_log_rerror( APLOG_MARK, APLOG_ERR, 0, f->r, "XMLENT XML Parse Error: %s at line %d\n",
                                        XML_ErrorString(XML_GetErrorCode(ctx->parser)), 
                                        XML_GetCurrentLineNumber(ctx->parser));
 
+                               XML_ParserFree(parser);
+                               parser = NULL;
                                return HTTP_INTERNAL_SERVER_ERROR; 
                        }
        }