Commit 06aea14d 06aea14de4fdbaf6875b499d08d7fec55e22facb by Alain Magloire

check the return status of pthread_mutex_destroy.

1 parent 91dfd76f
...@@ -74,7 +74,12 @@ mailer_create (mailer_t *pmailer, const char *name, int id) ...@@ -74,7 +74,12 @@ mailer_create (mailer_t *pmailer, const char *name, int id)
74 if (mailer == NULL) 74 if (mailer == NULL)
75 return ENOMEM; 75 return ENOMEM;
76 76
77 RWLOCK_INIT (&(mailer->rwlock), NULL); 77 status = RWLOCK_INIT (&(mailer->rwlock), NULL);
78 if (status != 0)
79 {
80 mailer_destroy (&mailer);
81 return status;
82 }
78 83
79 /* Parse the url, it may be a bad one and we should bailout if this 84 /* Parse the url, it may be a bad one and we should bailout if this
80 failed. */ 85 failed. */
......