summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index c3f562bac..734639312 100644
--- a/dive.c
+++ b/dive.c
@@ -2749,6 +2749,8 @@ void set_save_userid_local(short value)
void set_userid(char *rUserId)
{
+ if (prefs.userid)
+ free(prefs.userid);
prefs.userid = strdup(rUserId);
if (strlen(prefs.userid) > 30)
prefs.userid[30]='\0';