mirror of
https://github.com/moparisthebest/spdylay
synced 2024-11-17 15:05:01 -05:00
Ensure read_callback is non-NULL for request bodies.
This commit is contained in:
parent
f05a67641f
commit
63353ea486
@ -124,7 +124,7 @@ int spdylay_submit_request(spdylay_session *session, uint8_t pri,
|
|||||||
if(pri > 3) {
|
if(pri > 3) {
|
||||||
return SPDYLAY_ERR_INVALID_ARGUMENT;
|
return SPDYLAY_ERR_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
if(data_prd) {
|
if(data_prd != NULL && data_prd->read_callback != NULL) {
|
||||||
data_prd_copy = malloc(sizeof(spdylay_data_provider));
|
data_prd_copy = malloc(sizeof(spdylay_data_provider));
|
||||||
if(data_prd_copy == NULL) {
|
if(data_prd_copy == NULL) {
|
||||||
return SPDYLAY_ERR_NOMEM;
|
return SPDYLAY_ERR_NOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user