summaryrefslogtreecommitdiff
path: root/rtclient
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-18 00:20:38 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-18 00:20:38 +0800
commitbca38d6c015727c66248cd59908591806165ac83 (patch)
tree75e269f6c9fbd0a900a644a7ffa6103170605d64 /rtclient
parentcbb7d48b0aef7f73b4ae9bd70d04fe772d02a8f9 (diff)
Fix crash when not all properties filled
By properly initialising everything and checking before freeing
Diffstat (limited to 'rtclient')
-rw-r--r--rtclient/user.h7
1 files changed, 4 insertions, 3 deletions
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;
};