de-duplicate exit paths of imap_alloc_store()
This commit is contained in:
parent
c83330ffe8
commit
b148fd9e44
|
@ -1805,8 +1805,7 @@ imap_alloc_store( store_conf_t *conf, const char *label )
|
||||||
for (ctxp = &unowned; (ctx = (imap_store_t *)*ctxp); ctxp = &ctx->gen.next)
|
for (ctxp = &unowned; (ctx = (imap_store_t *)*ctxp); ctxp = &ctx->gen.next)
|
||||||
if (ctx->state == SST_GOOD && ctx->gen.conf == conf) {
|
if (ctx->state == SST_GOOD && ctx->gen.conf == conf) {
|
||||||
*ctxp = ctx->gen.next;
|
*ctxp = ctx->gen.next;
|
||||||
ctx->label = label;
|
goto gotstore;
|
||||||
return &ctx->gen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then try to recycle a server connection. */
|
/* Then try to recycle a server connection. */
|
||||||
|
@ -1835,6 +1834,7 @@ imap_alloc_store( store_conf_t *conf, const char *label )
|
||||||
|
|
||||||
gotsrv:
|
gotsrv:
|
||||||
ctx->gen.conf = conf;
|
ctx->gen.conf = conf;
|
||||||
|
gotstore:
|
||||||
ctx->label = label;
|
ctx->label = label;
|
||||||
return &ctx->gen;
|
return &ctx->gen;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user