Bug #1110 ยป 0071-packet_destroy-Fix-clang-analyzer-error.patch
| common/generate_packets.py | ||
|---|---|---|
|
}};
|
||
|
void (*handler)(void *packet) = (type < PACKET_LAST ? destroy_handlers[type] : nullptr);
|
||
|
fc_assert_action_msg(handler != nullptr, handler = free,
|
||
|
"packet_destroy(): invalid packet type %d", type);
|
||
|
if (handler == nullptr) {{
|
||
|
handler = free;
|
||
|
log_error("packet_destroy(): Invalid packet type %d", type);
|
||
|
}}
|
||
|
handler(packet);
|
||
|
}}
|
||