Skip to content
Snippets Groups Projects
Commit be2cdf14 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Don't call the lock/unlock functions if they are NULL. They can still be

NULL without violating protocol.
parent 0943f334
No related branches found
No related tags found
No related merge requests found
......@@ -186,7 +186,8 @@ Curl_share_lock(struct SessionHandle *data, curl_lock_data type,
return CURLSHE_INVALID;
if(share->specifier & (1<<type)) {
share->lockfunc(data, type, accesstype, share->clientdata);
if(share->lockfunc) /* only call this if set! */
share->lockfunc(data, type, accesstype, share->clientdata);
}
/* else if we don't share this, pretend successful lock */
......@@ -202,7 +203,8 @@ Curl_share_unlock(struct SessionHandle *data, curl_lock_data type)
return CURLSHE_INVALID;
if(share->specifier & (1<<type)) {
share->unlockfunc (data, type, share->clientdata);
if(share->unlockfunc) /* only call this if set! */
share->unlockfunc (data, type, share->clientdata);
}
return CURLSHE_OK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment