Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88447

QXmlSchemaValidator leaks memory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 5.15.1
    • XML: QtXmlPatterns
    • None
    • Windows

    Description

      QXmlSchemaValidator::validate() leaks memory.

      Example usage:

        try
       {
        // load the schema doc
        QFile xsdFile(Validation::MH_XML_SCHEMA);
        if (xsdFile.exists() && xsdFile.open(QIODevice::ReadOnly | QIODevice::Text))
        {
         // load the schema that we're going to compare xmlDoc against
         QXmlSchema schema;
         if (schema.load(&xsdFile))
         {
          QXmlSchemaValidator validator(schema);
          Validation::MessageHandler msgHandler;    // set a custom message handler
          validator.setMessageHandler(&msgHandler);    // do the validation
          success = validator.validate(xmlDoc.toUtf8());
      ...
      
      

      Approximately 10 KB of Memory is leaked for a single invocation.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            mallers Manfred Allers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes