summaryrefslogtreecommitdiff
path: root/src/users.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 02:31:23 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 02:31:23 +0000
commitfb5d7d181578bcba25327dfd4c2d5727fa71ce33 (patch)
treefafebdfc364d887136587397d01d7431afc2a77a /src/users.c
parent16e667a2cecf9492954333fc7949b6636072f941 (diff)
Properly initialized new objects when needed so they don't contain garbage data.
Also, converted line endings in os_ignore_db from CR+LF to LF. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1784 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/users.c')
-rw-r--r--src/users.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/users.c b/src/users.c
index 47a0ba1b9..93b7eef34 100644
--- a/src/users.c
+++ b/src/users.c
@@ -217,8 +217,10 @@ User::~User()
if (this->uid)
delete [] this->uid;
- Anope_Free(this->realname);
- delete [] this->hostip;
+ if (this->realname)
+ delete [] this->realname;
+ if (this->hostip)
+ delete [] this->hostip;
if (debug >= 2)
alog("debug: User::~User(): remove from channels");