From 892373af8586cbead091981141193c1d79bb70d4 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 6 Apr 2011 13:04:12 +0000 Subject: change apr_palloc+memcpy to apr_pmemdup PR: 47776 Submitted by: Boya Sun git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1089438 13f79535-47bb-0310-9956-ffa450edef68 --- xlate/xlate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlate') diff --git a/xlate/xlate.c b/xlate/xlate.c index 400949f1c..ab1c5f508 100644 --- a/xlate/xlate.c +++ b/xlate/xlate.c @@ -117,8 +117,8 @@ static void check_sbcs(apr_xlate_t *convset) * close the iconv descriptor */ - convset->sbcs_table = apr_palloc(convset->pool, sizeof(outbuf)); - memcpy(convset->sbcs_table, outbuf, sizeof(outbuf)); + convset->sbcs_table = apr_pmemdup(convset->pool, outbuf, sizeof(outbuf)); + iconv_close(convset->ich); convset->ich = (iconv_t)-1; -- cgit v1.2.1