Fixed memory leak in unit tests

This commit is contained in:
Tatsuhiro Tsujikawa 2012-03-08 00:25:00 +09:00
parent 11020146f5
commit 0e86cec673
1 changed files with 4 additions and 0 deletions

View File

@ -624,6 +624,8 @@ void test_spdylay_submit_response_with_null_data_read_callback()
acc.length-SPDYLAY_HEAD_LEN, acc.length-SPDYLAY_HEAD_LEN,
&session->hd_inflater)); &session->hd_inflater));
CU_ASSERT(0 == strcmp("version", frame.syn_reply.nv[0])); CU_ASSERT(0 == strcmp("version", frame.syn_reply.nv[0]));
spdylay_frame_syn_reply_free(&frame.syn_reply);
spdylay_session_del(session); spdylay_session_del(session);
} }
@ -686,6 +688,7 @@ void test_spdylay_submit_request_with_null_data_read_callback()
acc.length-SPDYLAY_HEAD_LEN, acc.length-SPDYLAY_HEAD_LEN,
&session->hd_inflater)); &session->hd_inflater));
CU_ASSERT(0 == strcmp("version", frame.syn_stream.nv[0])); CU_ASSERT(0 == strcmp("version", frame.syn_stream.nv[0]));
spdylay_frame_syn_stream_free(&frame.syn_stream);
spdylay_session_del(session); spdylay_session_del(session);
} }
@ -810,6 +813,7 @@ void test_spdylay_submit_headers()
acc.length-SPDYLAY_HEAD_LEN, acc.length-SPDYLAY_HEAD_LEN,
&session->hd_inflater)); &session->hd_inflater));
CU_ASSERT(0 == strcmp("version", frame.headers.nv[0])); CU_ASSERT(0 == strcmp("version", frame.headers.nv[0]));
spdylay_frame_headers_free(&frame.headers);
spdylay_session_del(session); spdylay_session_del(session);
} }