summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-29 22:54:28 -0400
committerJune McEnroe <june@causal.agency>2019-10-29 22:54:28 -0400
commitccfd8b843616d83c536b22a081dfd743c9faf199 (patch)
tree6953aa0baf99a2fd439036fe0a965fb5f5dacf14
parentUpdate self origin on nick change (diff)
downloadpounce-ccfd8b843616d83c536b22a081dfd743c9faf199.tar.gz
pounce-ccfd8b843616d83c536b22a081dfd743c9faf199.zip
Do not duplicate origin on nick change
Oops!
-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) {
abc715afcd21&follow=1'>Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe