mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
set NULL only when resource != NULL in FREE_SET_NULL
This commit is contained in:
parent
83c3fe5b7e
commit
db9c9ab091
@ -89,9 +89,10 @@ 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
|
||||||
|
Loading…
Reference in New Issue
Block a user