mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-18 08:18:07 +00:00
(net_http.c) net_http_new - add goto fail in case malloc fails
This commit is contained in:
parent
939b78753a
commit
bde4b0738c
@ -245,6 +245,9 @@ struct http_t *net_http_new(const char * url)
|
||||
state->buflen = 512;
|
||||
state->data = (char*)malloc(state->buflen);
|
||||
|
||||
if (!state->data)
|
||||
goto fail;
|
||||
|
||||
return state;
|
||||
|
||||
fail:
|
||||
|
Loading…
Reference in New Issue
Block a user