Follow-up Comment #1, bug #20627 (project freeciv):

real_packet = fc_malloc(sizeof(*result));
*result = packet_buf;
return result;

The typo is that _real_packet_ should be _result_ here.

But for all calls to this macro, _result_ is _real_packet_. So this doesn't
return a pointer to local memory, it clones the structure before returning. At
least, until someone doesn't use this macro outside _packets_gen.c_...


Reply to this item at:


  Message posté via/par Gna!

Freeciv-dev mailing list

Reply via email to