aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/share.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/share.c b/lib/share.c
index d6cb7cfdc..ff1aef2e5 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -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;