plug memory leaks in imap_{store,trash}_msg() error paths
This commit is contained in:
parent
4c2fb74207
commit
259132b7e7
|
@ -3214,6 +3214,7 @@ imap_trash_msg( store_t *gctx, message_t *msg,
|
||||||
cmd->param.to_trash = 1;
|
cmd->param.to_trash = 1;
|
||||||
if (prepare_trash( &buf, ctx ) < 0) {
|
if (prepare_trash( &buf, ctx ) < 0) {
|
||||||
cb( DRV_BOX_BAD, aux );
|
cb( DRV_BOX_BAD, aux );
|
||||||
|
free( cmd );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
imap_exec( ctx, &cmd->gen, imap_done_simple_msg,
|
imap_exec( ctx, &cmd->gen, imap_done_simple_msg,
|
||||||
|
@ -3252,11 +3253,13 @@ imap_store_msg( store_t *gctx, msg_data_t *data, int to_trash,
|
||||||
cmd->param.to_trash = 1;
|
cmd->param.to_trash = 1;
|
||||||
if (prepare_trash( &buf, ctx ) < 0) {
|
if (prepare_trash( &buf, ctx ) < 0) {
|
||||||
cb( DRV_BOX_BAD, 0, aux );
|
cb( DRV_BOX_BAD, 0, aux );
|
||||||
|
free( cmd );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (prepare_box( &buf, ctx ) < 0) {
|
if (prepare_box( &buf, ctx ) < 0) {
|
||||||
cb( DRV_BOX_BAD, 0, aux );
|
cb( DRV_BOX_BAD, 0, aux );
|
||||||
|
free( cmd );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user