Avoid double-close paths in http tests

Coverity spotted that there were some paths through the test
functions that would double-close some sockets.
This commit is contained in:
Nick Mathewson 2014-03-13 10:46:59 -04:00
parent b6f15ccea6
commit 2578ec14f5

View File

@ -734,6 +734,7 @@ http_delete_test(void *arg)
bufferevent_free(bev);
evutil_closesocket(fd);
fd = -1;
evhttp_free(http);
@ -2747,6 +2748,7 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout)
bufferevent_free(bev);
if (use_timeout) {
evutil_closesocket(fd);
fd = -1;
}
evhttp_free(http);