Ensure read_callback is non-NULL for request bodies.

This commit is contained in:
Jim Morrison 2012-02-15 14:30:36 -08:00
parent f05a67641f
commit 63353ea486
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ int spdylay_submit_request(spdylay_session *session, uint8_t pri,
if(pri > 3) {
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));
if(data_prd_copy == NULL) {
return SPDYLAY_ERR_NOMEM;