diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-10-11 04:40:50 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-10-11 04:40:50 +0000 |
commit | fa19def3a145865a1852591fc0a47122b03b3ccf (patch) | |
tree | 1f316f7f8e425d98bf0ed5a65f4ccf57149965f7 /pjlib-util | |
parent | a6bec438de0d3d52b90815a836e5f974765d2991 (diff) |
Some more error handling (re #1384: HTTP client source port range)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3811 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib-util')
-rw-r--r-- | pjlib-util/src/pjlib-util/http_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pjlib-util/src/pjlib-util/http_client.c b/pjlib-util/src/pjlib-util/http_client.c index d92db1e3..cf96a2df 100644 --- a/pjlib-util/src/pjlib-util/http_client.c +++ b/pjlib-util/src/pjlib-util/http_client.c @@ -1073,6 +1073,7 @@ static pj_status_t start_http_req(pj_http_req *http_req, if (status != PJ_SUCCESS) { PJ_PERROR(1,(THIS_FILE, status, "Unable to bind to the requested port")); + pj_sock_close(sock); goto on_return; } @@ -1082,8 +1083,7 @@ static pj_status_t start_http_req(pj_http_req *http_req, NULL, http_req->ioqueue, &asock_cb, http_req, &http_req->asock); if (status != PJ_SUCCESS) { - if (sock != PJ_INVALID_SOCKET) - pj_sock_close(sock); + pj_sock_close(sock); goto on_return; // error creating activesock } |