summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/state.c b/state.c
index f51a09b..50afb26 100644
--- a/state.c
+++ b/state.c
@@ -268,7 +268,8 @@ static void handleNick(struct Message *msg) {
 	char *origin = malloc(size);
 	if (!origin) err(EX_OSERR, "malloc");
 	snprintf(origin, size, "%s%s", self.nick, rest);
-	set(&self.origin, origin);
+	free(self.origin);
+	self.origin = origin;
 }
 
 static void handleJoin(struct Message *msg) {