From ca650230ae7dfa2c34d38d211349d899cc846458 Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Mon, 30 Sep 2024 15:18:50 +0300 Subject: [PATCH] jabber: proper check of NULL return Complete 607d178c3e, fixes CID #40852 --- modules/jabber/xjab_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/jabber/xjab_worker.c b/modules/jabber/xjab_worker.c index 734e88d5a42..074eaf5ceb7 100644 --- a/modules/jabber/xjab_worker.c +++ b/modules/jabber/xjab_worker.c @@ -413,7 +413,7 @@ int xj_worker_process(xj_wlist jwl, char* jaddress, int jport, char* priority, LM_DBG("%d: new connection for <%s>.\n", _xj_pid, buff); #endif if(dbf->query(db_con, keys, 0, vals, col, 2, 2, NULL, &res) != 0 || - (res && RES_ROW_N(res) <= 0)) + !res || RES_ROW_N(res) <= 0) { #ifdef XJ_EXTRA_DEBUG LM_DBG("%d: no database result when looking"