1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

set NULL only when resource != NULL in FREE_SET_NULL

This commit is contained in:
Dmitry Podgorny 2013-01-12 23:23:40 +02:00
parent 83c3fe5b7e
commit db9c9ab091

View File

@ -88,10 +88,11 @@ static int _presence_handler(xmpp_conn_t * const conn,
static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata); static int _ping_timed_handler(xmpp_conn_t * const conn, void * const userdata);
#define FREE_SET_NULL(resource) \ #define FREE_SET_NULL(resource) \
{\ { \
if (resource != NULL) \ if (resource != NULL) { \
free(resource); \ free(resource); \
resource = NULL; \ resource = NULL; \
} \
} }
void void