check the return status of pthread_mutex_destroy.
Showing
1 changed file
with
6 additions
and
1 deletions
... | @@ -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. */ |
... | ... |
-
Please register or sign in to post a comment