Deallocating session context

When you are done with your virus checks, you have to free the session context that you initially allocated with kav_new. Use the following function to do so:

void kav_free(kav_ctx ctx);

The kav_free function deallocates the session context ctx and releases any resources allocated to it, including check results and shared memory segment, of any. In other words, kav_free internally calls kav_reset and kav_shmem_cleanup. After this you cannot call any libkavclient function on ctx. You must call kav_free on any context that you allocated with kav_new.