unit-tests: Zero-initialize chunk to avoid free on non-successful fetch

If the fetch fails, the fetcher is not required to return an empty chunk. Avoid
the resulting invalid free() by initializing data.ptr to NULL.
This commit is contained in:
Martin Willi 2014-06-02 12:52:32 +02:00
parent 8a072fc50a
commit 74eedc8061

View File

@ -281,7 +281,7 @@ START_TEST(test_response_code)
{
stream_service_t *service;
status_t status;
chunk_t data;
chunk_t data = chunk_empty;
char uri[256];
u_int code;