diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2017-01-19 07:41:25 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2017-01-19 07:41:25 +0000 |
commit | 52bd651923fc669cd58007de4018cd6bdb94f329 (patch) | |
tree | 663e8575b34ae178240a4383bdab9cc8a8b00c6f /pjnath/src/pjnath-test | |
parent | 8ac264258cc6242cade69f1c5964388bcfc76e15 (diff) |
Re #1513: Applied the new API pj_pool_safe_release().
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5534 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/src/pjnath-test')
-rw-r--r-- | pjnath/src/pjnath-test/ice_test.c | 6 | ||||
-rw-r--r-- | pjnath/src/pjnath-test/server.c | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/pjnath/src/pjnath-test/ice_test.c b/pjnath/src/pjnath-test/ice_test.c index 80f8c480..98456aaa 100644 --- a/pjnath/src/pjnath-test/ice_test.c +++ b/pjnath/src/pjnath-test/ice_test.c @@ -402,11 +402,7 @@ static void destroy_sess(struct test_sess *sess, unsigned wait_msec) sess->server2 = NULL; } - if (sess->pool) { - pj_pool_t *pool = sess->pool; - sess->pool = NULL; - pj_pool_release(pool); - } + pj_pool_safe_release(&sess->pool); } static void ice_on_rx_data(pj_ice_strans *ice_st, diff --git a/pjnath/src/pjnath-test/server.c b/pjnath/src/pjnath-test/server.c index 0205f4a0..c1644cae 100644 --- a/pjnath/src/pjnath-test/server.c +++ b/pjnath/src/pjnath-test/server.c @@ -254,11 +254,7 @@ void destroy_test_server(test_server *test_srv) test_srv->dns_server = NULL; } - if (test_srv->pool) { - pj_pool_t *pool = test_srv->pool; - test_srv->pool = NULL; - pj_pool_release(pool); - } + pj_pool_safe_release(&test_srv->pool); } static pj_bool_t stun_on_data_recvfrom(pj_activesock_t *asock, |