std: Fix a memleak on error in c_iconv().

CID: #1032806

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Klaas Freitag 2013-07-10 15:00:30 +02:00 committed by Andreas Schneider
parent 7c4c7f1b04
commit 0876c18ec9

View file

@ -124,6 +124,7 @@ static char *c_iconv(const char* str, enum iconv_direction dir)
} }
if (ret == (size_t)-1) { if (ret == (size_t)-1) {
SAFE_FREE(out);
return NULL; return NULL;
} }