Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-741

Coverity scan reported errors in Qpid Dispatch master

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.7.0
    • 1.0.0
    • Tests
    • None

    Description

        • CID 124934: (RESOURCE_LEAK)
          /home/gmurthy/opensource/dispatch/tests/message_test.c: 165 in test_message_properties()
          /home/gmurthy/opensource/dispatch/tests/message_test.c: 182 in test_message_properties()

      ________________________________________________________________________________________________________

          • CID 124934: (RESOURCE_LEAK)
            /home/gmurthy/opensource/dispatch/tests/message_test.c: 165 in test_message_properties()
            159 qd_message_content_t *content = MSG_CONTENT(msg);
            160
            161 set_content(content, size);
            162
            163 qd_iterator_t *iter = qd_message_field_iterator(msg, QD_FIELD_CORRELATION_ID);
            164 if (!iter) return "Expected iterator for the 'correlation-id' field";
            >>> CID 124934: (RESOURCE_LEAK)
            >>> Variable "iter" going out of scope leaks the storage it points to.
            165 if (qd_iterator_length(iter) != 13) return "Bad length for correlation-id";
            166 if (!qd_iterator_equal(iter, (const unsigned char *)"correlationId")) { 167 qd_iterator_free(iter); 168 return "Invalid correlation-id"; 169 }

            170 qd_iterator_free(iter);
            /home/gmurthy/opensource/dispatch/tests/message_test.c: 182 in test_message_properties()
            176 return "Bad value for subject";
            177 }
            178 qd_iterator_free(iter);
            179
            180 iter = qd_message_field_iterator(msg, QD_FIELD_MESSAGE_ID);
            181 if (!iter) return "Expected iterator for the 'message-id' field";
            >>> CID 124934: (RESOURCE_LEAK)
            >>> Variable "iter" going out of scope leaks the storage it points to.
            182 if (qd_iterator_length(iter) != 9) return "Bad length for message-id";
            183 if (!qd_iterator_equal(iter, (const unsigned char *)"messageId"))

            { 184 qd_iterator_free(iter); 185 return "Invalid message-id"; 186 }

            187 qd_iterator_free(iter);

        • CID 11360: Memory - corruptions (NEGATIVE_RETURNS)
          /home/gmurthy/opensource/dispatch/tests/message_test.c: 123 in test_receive_from_messenger()

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gmurthy Ganesh Murthy
            gmurthy Ganesh Murthy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment