fixed crash bug in cmd_NeonServ.mod/cmd_neonserv_set.c
[NeonServV5.git] / src / modules / NeonServ.mod / cmd_neonserv_assignrank.c
index 1662706f33bf9063b27ddd70f4477eceb30b1a53..19a906a3df20e89898ce279c4ddcf60588d5c21f 100644 (file)
@@ -1,4 +1,4 @@
-/* cmd_neonserv_assignrank.c - NeonServ v5.4
+/* cmd_neonserv_assignrank.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -59,7 +59,7 @@ CMD_BIND(neonserv_cmd_assignrank) {
             //but first lookup the auth to check if it really exists
             struct neonserv_cmd_assignrank_cache *cache = malloc(sizeof(*cache));
             if (!cache) {
-                perror("malloc() failed");
+                printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
                 return;
             }
             cache->client = client;
@@ -85,7 +85,7 @@ CMD_BIND(neonserv_cmd_assignrank) {
         } else {
             struct neonserv_cmd_assignrank_cache *cache = malloc(sizeof(*cache));
             if (!cache) {
-                perror("malloc() failed");
+                printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
                 return;
             }
             cache->client = client;