X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/012aaa91b77cc74ee7bc4f56d1aaefc99eae5d81..47854c5fdbdebaf707de438f0fa86c4cb99d2268:/disobedience/login.c diff --git a/disobedience/login.c b/disobedience/login.c index 36850c1..90eaa0d 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 */