]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
deliver: Don't break if username gets changed by userdb lookup.
authorTimo Sirainen <tss@iki.fi>
Tue, 16 Dec 2008 13:37:16 +0000 (15:37 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 16 Dec 2008 13:37:16 +0000 (15:37 +0200)
--HG--
branch : HEAD

src/deliver/deliver.c

index 60d0cbccab813d094b05ed3ab12c9b24aead4629..806953ed02e283ea8b4cae883438406b85668716 100644 (file)
@@ -995,6 +995,9 @@ int main(int argc, char *argv[])
                        i_set_failure_prefix(t_strdup_printf("deliver(%s): ",
                                                             user));
                }
+               /* if user was changed, it was allocated from userdb_pool
+                  which we'll free soon. */
+               user = t_strdup(user);
        }
 
        expand_envs(user);