summaryrefslogtreecommitdiff
path: root/src/hostserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hostserv.c')
-rw-r--r--src/hostserv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hostserv.c b/src/hostserv.c
index 94e8354f8..84864c33c 100644
--- a/src/hostserv.c
+++ b/src/hostserv.c
@@ -173,6 +173,10 @@ HostCore *findHostCore(HostCore * head, char *nick, boolean * found)
current = head;
previous = current;
+ if (!nick) {
+ return NULL;
+ }
+
while (current != NULL) {
if (stricmp(nick, current->nick) == 0) {
*found = true;
@@ -200,6 +204,10 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick,
HostCore *newCore, *tmp;
+ if (!nick || !vHost || !creator) {
+ return NULL;
+ }
+
newCore = malloc(sizeof(HostCore));
if (newCore == NULL) {
anope_cmd_global(s_HostServ,