From 466d0e383fa7d8d6152cff190e739f81bf190acd Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 20 Jun 2012 14:17:08 +0200 Subject: [PATCH] remove temp attachment files if it's a duplicate message --- src/message.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/message.c b/src/message.c index 19d5df11..f415a3a8 100644 --- a/src/message.c +++ b/src/message.c @@ -378,6 +378,7 @@ int process_message(struct session_data *sdata, struct _state *state, struct __d /* discard if existing message_id */ if(is_existing_message_id(sdata, state, data, cfg) == 1){ + for(i=1; i<=state->n_attachments; i++) unlink(state->attachments[i].internalname); return ERR_EXISTS; }