s3-charcnv: remove remaining malloc references in convert_string_talloc().
authorGünther Deschner <gd@samba.org>
Sun, 7 Jun 2009 14:04:07 +0000 (16:04 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 8 Jun 2009 08:26:40 +0000 (10:26 +0200)
Guenther

source3/lib/charcnv.c

index 1f2fa63f3e999eb1f878faa00c5a770ebf01484f..bb9b2054d10e1b69d59609653931deaab2bf53a9 100644 (file)
@@ -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 {