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

RECEIVE_PACKET_END(result):
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:

  <http://gna.org/bugs/?20627>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to