} else {
struct neonserv_cmd_invite_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;
static struct neonserv_cmd_invite_timeout* neonserv_cmd_invite_add_timeout(char *nick, char *chan) {
struct neonserv_cmd_invite_timeout *entry = malloc(sizeof(*entry));
if (!entry) {
- perror("malloc() failed");
+ printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
return NULL;
}
entry->next = NULL;