summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-04-19 15:16:51 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-04-19 15:16:51 -0700
commit0b443c1b769b9c9a3b45b4252afe07e18b709ff4 (patch)
tree924d4207a0bdc75ecc3078c39e5c5ee55d566315
parent1222f974442f3d419664be4faca576f5f1457666 (diff)
Make XdmcpCopyARRAY8 call XdmcpAllocARRAY8 instead of replicating it
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Array.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Array.c b/Array.c
index 4f0561f..f529781 100644
--- a/Array.c
+++ b/Array.c
@@ -145,12 +145,8 @@ XdmcpARRAY8Equal (const ARRAY8Ptr array1, const ARRAY8Ptr array2)
int
XdmcpCopyARRAY8 (const ARRAY8Ptr src, ARRAY8Ptr dst)
{
- dst->data = (CARD8 *) xmalloc(src->length * sizeof (CARD8));
- if (!dst->data) {
- dst->length = 0;
+ if (!XdmcpAllocARRAY8(dst, src->length))
return FALSE;
- }
- dst->length = src->length;
memmove (dst->data, src->data, src->length * sizeof (CARD8));
return TRUE;
}