summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-06-07 16:04:07 +0200
committerGünther Deschner <gd@samba.org>2009-06-08 10:26:40 +0200
commit2775c52baabc042089c7d1663d1fedb9b189bfab (patch)
tree8b78bcf6d95f4573493c3a51483db89e70c274d1
parent7e8b3d8c06840d09d4658f0b3651c7e2af120acf (diff)
downloadsamba-2775c52baabc042089c7d1663d1fedb9b189bfab.tar.gz
samba-2775c52baabc042089c7d1663d1fedb9b189bfab.tar.bz2
samba-2775c52baabc042089c7d1663d1fedb9b189bfab.zip
s3-charcnv: remove remaining malloc references in convert_string_talloc().
Guenther
-rw-r--r--source3/lib/charcnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 1f2fa63f3e..bb9b2054d1 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 {