mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
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:
parent
8a072fc50a
commit
74eedc8061
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user