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

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