]> git.michaelhowe.org Git - packages/o/openafs.git/commit
vos: do not mix memory allocation methods
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 28 Dec 2010 00:34:14 +0000 (19:34 -0500)
committerDerrick Brashear <shadow@dementia.org>
Thu, 3 Feb 2011 02:38:35 +0000 (18:38 -0800)
commita3a7fb4fd617aaa1bd372bc2929caa9d01987cc6
tree0a678d6f423ce803baaea1c8701a605b11222364
parent715a025c12ab06c3397ee10d72eee55eecc9fcbe
vos: do not mix memory allocation methods

ListVLDB mixed memory allocated with xdr_alloc() and memory
allocated with malloc().  This is not safe to do since it is
possible on some platforms for xdr_alloc() to allocated memory
using a method other than the malloc() linked to the vos
executable.

Instead of stealing the xdr_alloc()'d buffer, allocate a new
buffer and copy the contents.

Reviewed-on: http://gerrit.openafs.org/3600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 463b045b9fe4a412877c2a65f5deafb1442c1bf1)

Change-Id: I64f43459a212ceb1b4f89e45a9827fc7b981ff6e
Reviewed-on: http://gerrit.openafs.org/3807
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/volser/vos.c