X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/66e82ceed9f7c9ba9958176d1828afbb171501c9..cdabf44d4bf72678b402c0fd7dac394eb36513da:/disobedience/login.c diff --git a/disobedience/login.c b/disobedience/login.c index a02c1c6..0c6e7d7 100644 --- a/disobedience/login.c +++ b/disobedience/login.c @@ -120,11 +120,13 @@ static void set_service(struct config *c, const char *s) { } static void set_username(struct config *c, const char *s) { - c->username = s; + xfree(c->username); + c->username = xstrdup(s); } static void set_password(struct config *c, const char *s) { - c->password = s; + xfree(c->password); + c->password = xstrdup(s); } /** @brief Table used to generate the form */