Merge pull request #10 from dang/lock-order

Fix coverity 131560
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0409be2..39795a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@
 # version numbers
 set(NTIRPC_MAJOR_VERSION 1)
 set(NTIRPC_MINOR_VERSION 3)
-set(NTIRPC_PATCH_LEVEL 0)
+set(NTIRPC_PATCH_LEVEL 1)
 set(VERSION_COMMENT
   "Full-duplex and bi-directional ONC RPC on TCP."
 )
diff --git a/src/svc_rqst.c b/src/svc_rqst.c
index f3d6338..e167bc4 100644
--- a/src/svc_rqst.c
+++ b/src/svc_rqst.c
@@ -870,7 +870,8 @@
 	/* xprt must be unlocked before sr_rec */
 	mutex_unlock(&xprt->xp_lock);
 
-	mutex_unlock(&sr_rec->mtx);
+	if (sr_rec)
+		mutex_unlock(&sr_rec->mtx);
 }
 
 bool_t __svc_clean_idle2(int timeout, bool_t cleanblock);