From: Günther Deschner Date: Sun, 7 Jun 2009 14:04:07 +0000 (+0200) Subject: s3-charcnv: remove remaining malloc references in convert_string_talloc(). X-Git-Tag: tdb-1.1.5~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2775c52baabc042089c7d1663d1fedb9b189bfab;p=thirdparty%2Fsamba.git s3-charcnv: remove remaining malloc references in convert_string_talloc(). Guenther --- diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 1f2fa63f3e9..bb9b2054d10 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -558,7 +558,7 @@ bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, return false; } if (srclen == 0) { - ob = ((ctx != NULL) ? talloc_strdup(ctx, "") : SMB_STRDUP("")); + ob = talloc_strdup(ctx, ""); if (ob == NULL) { errno = ENOMEM; return false; @@ -587,7 +587,7 @@ bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, if (!conv_silent) DEBUG(0, ("convert_string_talloc: destlen wrapped !\n")); if (!ctx) - SAFE_FREE(outbuf); + TALLOC_FREE(outbuf); errno = EOPNOTSUPP; return false; } else {