X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/cb570b5ea1ff234ae16b2c32a236ccd520a80f7a..e37f8a84f5374b0d03676a65018b00e972ed47c6:/src/src/routers/redirect.c diff --git a/src/src/routers/redirect.c b/src/src/routers/redirect.c index 2efb42160..2434d3cb7 100644 --- a/src/src/routers/redirect.c +++ b/src/src/routers/redirect.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -655,8 +655,8 @@ if (!ugid.gid_set && pw != NULL) // eximsrs_db_set(FALSE, NULL); */ - if(ob->srs_alias != NULL ? (usedomain = expand_string(ob->srs_alias)) == NULL : 1) - usedomain = deliver_domain; + if (!(usedomain = ob->srs_alias ? expand_string(ob->srs_alias) : NULL)) + usedomain = string_copy(deliver_domain); if((n_srs = eximsrs_forward(&res, sender_address, usedomain)) == OK) {