diff options
author | Rainer Jung <rjung@apache.org> | 2013-10-03 14:35:18 +0000 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2013-10-03 14:35:18 +0000 |
commit | b5cecf3fc854caace9dbbe019653e5795961579b (patch) | |
tree | 4aa032af7cede27b9c96f6ae7fbbef1b21c077d9 /file_io/win32 | |
parent | 74bcc0c0b5ae396e7443aab86013d074327af521 (diff) | |
download | apr-b5cecf3fc854caace9dbbe019653e5795961579b.tar.gz |
change apr_palloc+memcpy to apr_pmemdup
PR: 47776
Submitted by: Boya Sun <boya.sun case.edu>
Backport of r1089438 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1528891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32')
-rw-r--r-- | file_io/win32/filedup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/file_io/win32/filedup.c b/file_io/win32/filedup.c index b44b25611..553228e3f 100644 --- a/file_io/win32/filedup.c +++ b/file_io/win32/filedup.c @@ -186,8 +186,7 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p) { - *new_file = (apr_file_t *)apr_palloc(p, sizeof(apr_file_t)); - memcpy(*new_file, old_file, sizeof(apr_file_t)); + *new_file = (apr_file_t *)apr_pmemdup(p, old_file, sizeof(apr_file_t)); (*new_file)->pool = p; if (old_file->buffered) { (*new_file)->buffer = apr_palloc(p, old_file->bufsize); |