Use late-binding to finalize snprintf/sscanf
Not all users require the snprintf/sscanf helpers, and in some types the
finalization can take a long time. Defer the finalization until the
first use. Wrap the invocation with a bound function such that the
BPFTable and other users don't need to keep an explicit BPFModule
reference. Use-after-free will be avoided by resetting the function to
an error-returning stub when/if the BPFModule is freed.
Signed-off-by: Brenden Blanco <bblanco@gmail.com>
Showing
Please register or sign in to comment