(net_http.c) net_http_new - add goto fail in case malloc fails

This commit is contained in:
twinaphex 2015-02-16 06:24:06 +01:00
parent 939b78753a
commit bde4b0738c

View File

@ -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: