You must deallocate per-connection resources because filter
applications exist for a long time and they handle many connections.
The lifetime of a connection depends on calls to the callbacks xxfi_connect() and xxfi_close(). For more information on message-oriented and connection-oriented
APIs, see “Message Modification
APIs” and “Data Access APIs”, respectively. Only
one connection-specific data pointer is available for each connection.
Each message is marked by calls to the xxfi_envfrom() and xxfi_eom() callbacks (or the xxfi_abort() callback), which implies that message-specific
resources are allocated and reclaimed from these routines. Only
one active message is available because the messages in a connection
are processed sequentially by each filter, and it is associated with
a given connection and filter (and connection-private data block). The
filter application must access these resources through the smfi_getpriv() and smfi_setpriv() APIs and must reclaim the resources using the xxfi_abort() API.