]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Destroy attr of RWLock after initialized 17103/head
authorzhangwen <zhangwen1@unionpay.com>
Sun, 20 Aug 2017 08:58:07 +0000 (16:58 +0800)
committerzhangwen <zhangwen1@unionpay.com>
Sun, 20 Aug 2017 08:58:07 +0000 (16:58 +0800)
Signed-off-by: Wen Zhang <zhangwen1@unionpay.com>
src/common/RWLock.h

index fd8a2665ef18f657d4c9b4d2939e5ea908068cbe..137e70e5bf8487837a855cc9053374750f6ef59d 100644 (file)
@@ -52,6 +52,7 @@ public:
       pthread_rwlockattr_setkind_np(&attr,
           PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
       pthread_rwlock_init(&L, &attr);
+      pthread_rwlockattr_destroy(&attr);
     } else 
 #endif 
     // Next block is in {} to possibly connect to the above if when code is used.