summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/unix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/unix.c b/core/unix.c
index 963d25ac5..a75bcd792 100644
--- a/core/unix.c
+++ b/core/unix.c
@@ -48,7 +48,8 @@ void subsurface_user_info(struct user_info *user)
struct membuffer mb = {};
gethostname(hostname, sizeof(hostname));
put_format(&mb, "%s@%s", username, hostname);
- user->email = mb_cstring(&mb); // 'email' is heap allocated
+ mb_cstring(&mb);
+ user->email = detach_buffer(&mb);
}
}