[
https://issues.apache.org/jira/browse/DISPATCH-741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960917#comment-15960917
]
ASF subversion and git services commented on DISPATCH-741:
----------------------------------------------------------
Commit b7b9d560fe0b1196544307cf41621d36818b07e9 in qpid-dispatch's branch
refs/heads/master from [~ganeshmurthy]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-dispatch.git;h=b7b9d56 ]
DISPATCH-741 - Fix Coverity leaks/errors reported in unit tests
> Coverity scan reported errors in Qpid Dispatch master
> -----------------------------------------------------
>
> Key: DISPATCH-741
> URL: https://issues.apache.org/jira/browse/DISPATCH-741
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Tests
> Affects Versions: 0.7.0
> Reporter: Ganesh Murthy
> Assignee: Ganesh Murthy
> Priority: Minor
> Fix For: 1.0.0
>
>
> ** 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()
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]