mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9981 from janjongboom/patch-8
test_soap_connection_handler leaks memory when open_connection failspull/10343/head
commit
801e555121
|
|
@ -403,6 +403,7 @@ bool test_socket_api_callbacks()
|
||||||
coap_conn_handler_t *handler = connection_handler_create(&receive_from_sock_cb, &send_to_sock_cb, NULL, NULL);
|
coap_conn_handler_t *handler = connection_handler_create(&receive_from_sock_cb, &send_to_sock_cb, NULL, NULL);
|
||||||
nsdynmemlib_stub.returnCounter = 2;
|
nsdynmemlib_stub.returnCounter = 2;
|
||||||
if (0 != coap_connection_handler_open_connection(handler, 22, false, false, true, false)) {
|
if (0 != coap_connection_handler_open_connection(handler, 22, false, false, true, false)) {
|
||||||
|
free(sckt_data);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -483,6 +484,7 @@ bool test_security_callbacks()
|
||||||
coap_conn_handler_t *handler = connection_handler_create(&receive_from_sock_cb, &send_to_sock_cb, NULL, NULL);
|
coap_conn_handler_t *handler = connection_handler_create(&receive_from_sock_cb, &send_to_sock_cb, NULL, NULL);
|
||||||
nsdynmemlib_stub.returnCounter = 2;
|
nsdynmemlib_stub.returnCounter = 2;
|
||||||
if (0 != coap_connection_handler_open_connection(handler, 22, false, true, true, false)) {
|
if (0 != coap_connection_handler_open_connection(handler, 22, false, true, true, false)) {
|
||||||
|
free(sckt_data);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue