chiark / gitweb /
Add documentation and administrivia about `disorder-gstdecode'.
[disorder] / disobedience / login.c
index a02c1c6e698188013c2a5e80051a5083ab8d92ed..0c6e7d74dd44756d10f123f6bbaba055aafc59e3 100644 (file)
@@ -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 */