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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user