diff options
-rw-r--r-- | src/clamsmtpd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index 44ccf46..253d1ee 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -458,10 +458,18 @@ spctx_t* cb_new_context() void cb_del_context(spctx_t* sp) { clctx_t* ctx = (clctx_t*)sp; + int x; ASSERT(sp); disconnect_clam(ctx); free(ctx); + + if(g_clstate.virusaction) + { + /* Cleanup any old actions */ + while(waitpid(-1, &x, WNOHANG) > 0) + ; + } } /* ---------------------------------------------------------------------------------- |