]> rtime.felk.cvut.cz Git - orte.git/commitdiff
Fix deinitialization in an error path
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 6 Oct 2014 23:19:48 +0000 (01:19 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 6 Feb 2015 17:10:01 +0000 (18:10 +0100)
orte/liborte/ORTEDomain.c

index be4e0b1473deee5837b57f2fdee0c094976e51e3..0ad73e1d02bbfcb794c53fcb14ec2577ce907429 100644 (file)
@@ -741,8 +741,8 @@ err_sock:
   CDR_codec_release_buffer(&d->taskRecvUnicastMetatraffic.mb.cdrCodec);
 err_domainProp:
   if (!errno_save) errno_save = errno;
-  pthread_rwlock_init(&d->patternEntry.lock,NULL);
-  pthread_rwlock_init(&d->psEntry.subscriptionsLock,NULL);
+  pthread_rwlock_destroy(&d->patternEntry.lock);
+  pthread_rwlock_destroy(&d->psEntry.subscriptionsLock);
   pthread_rwlock_destroy(&d->psEntry.publicationsLock);
   pthread_rwlock_destroy(&d->subscriptions.lock);
   pthread_rwlock_destroy(&d->publications.lock);