widl: Tweak the rules for when to call pfnFree for arrays.

Varying arrays that aren't unmarshalled shouldn't be freed, but 
conformant arrays that aren't unmarshalled should.
oldstable
Rob Shearman 2007-12-21 09:41:40 +00:00 committed by Alexandre Julliard
parent a4269c8eed
commit b57a322b02
1 changed files with 4 additions and 3 deletions

View File

@ -2765,9 +2765,10 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func,
{
/* these are all unmarshalled by pointing into the buffer on the
* server side */
if (type->type != RPC_FC_SMFARRAY &&
type->type != RPC_FC_LGFARRAY &&
type->type != RPC_FC_CARRAY)
if (type->type == RPC_FC_BOGUS_ARRAY ||
type->type == RPC_FC_CVARRAY ||
(type->type == RPC_FC_SMVARRAY && type->type == RPC_FC_LGVARRAY && in_attr) ||
(type->type == RPC_FC_CARRAY && type->type == RPC_FC_CARRAY && !in_attr))
{
print_file(file, indent, "if (%s)\n", var->name);
indent++;