From bca38d6c015727c66248cd59908591806165ac83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Wed, 18 Sep 2019 00:20:38 +0800 Subject: Fix crash when not all properties filled By properly initialising everything and checking before freeing --- rtclient/user.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rtclient') diff --git a/rtclient/user.h b/rtclient/user.h index 7c457f0..9511f9f 100644 --- a/rtclient/user.h +++ b/rtclient/user.h @@ -412,12 +412,11 @@ enum rt_timezone { struct rt_user { char *id; - char *password; char *name; + char *password; char *emailaddress; char *realname; char *nickname; - char *gecos; char *organization; char *address1; char *address2; @@ -432,7 +431,9 @@ struct rt_user { char *contactinfo; char *comments; char *signature; - char lang[2]; + char *gecos; + enum rt_lang lang; + enum rt_timezone timezone; bool privileged; bool disabled; }; -- cgit v1.2.3