summaryrefslogtreecommitdiffstats
path: root/ircxmpp.c
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-05-06 23:18:39 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2022-05-06 23:18:39 +0200
commit7c30a3763add5b789f5434b43bed750318d7254f (patch)
tree83bf2f27c1a178daa099e3ac111f8063a718b213 /ircxmpp.c
parent0.0.7 (diff)
downloadircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.tar
ircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.tar.gz
ircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.tar.bz2
ircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.tar.lz
ircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.tar.xz
ircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.tar.zst
ircxmpp-7c30a3763add5b789f5434b43bed750318d7254f.zip
Diffstat (limited to 'ircxmpp.c')
-rw-r--r--ircxmpp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ircxmpp.c b/ircxmpp.c
index 09d9d46..aa23b8d 100644
--- a/ircxmpp.c
+++ b/ircxmpp.c
@@ -626,6 +626,8 @@ static void send_xmpp_logs_to_me (void * const u, const xmpp_log_level_t l, cons
struct ircxmpp * ircxmpp_init (void) {
xmpp_initialize();
struct ircxmpp * ircxmpp = calloc(1, sizeof(struct ircxmpp));
+ if (!ircxmpp)
+ return NULL;
ircxmpp->log_handler = default_log_handler;
ircxmpp->xmpp_logger.handler = send_xmpp_logs_to_me;
ircxmpp->xmpp_logger.userdata = ircxmpp;
@@ -772,7 +774,7 @@ int main (void) {
"multiple links can be specified by appending a consecutive number, starting with " \
"2, to every environment variable. first link is IX_*, second is IX_*2, and so on.\n"
size_t handles_length = 0;
- char * domain; // to know if we want to run dns server or not
+ char * domain = NULL; // to know if we want to run dns server or not
ircxmpp ** handles = NULL;
while (1) { // note that if input config is invalid we leak memory before exiting
char b[64]; // i don't free any allocated shit and just return, probably it's ok