Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
intlconv: Add some missing close calls (coverity)
  • Loading branch information
perexg committed Oct 3, 2014
1 parent 22f0608 commit cb2e797
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/intlconv.c
Expand Up @@ -133,6 +133,7 @@ intlconv_utf8( char *dst, size_t dst_size,
ic = malloc(sizeof(*ic));
if (ic == NULL) {
pthread_mutex_unlock(&intlconv_lock);
iconv_close(c);
return -ENOMEM;
}
ic->ic_charset_id = strdup(dst_charset_id);
Expand Down Expand Up @@ -215,6 +216,7 @@ intlconv_to_utf8( char *dst, size_t dst_size,
ic = malloc(sizeof(*ic));
if (ic == NULL) {
pthread_mutex_unlock(&intlconv_lock_src);
iconv_close(c);
return -ENOMEM;
}
ic->ic_charset_id = strdup(src_charset_id);
Expand Down

0 comments on commit cb2e797

Please sign in to comment.