From db9c9ab091c40bf2249010816cd0831520afc2e0 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Sat, 12 Jan 2013 23:23:40 +0200 Subject: [PATCH] set NULL only when resource != NULL in FREE_SET_NULL --- src/jabber.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jabber.c b/src/jabber.c index 485efadf..a3db7d85 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -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); #define FREE_SET_NULL(resource) \ -{\ - if (resource != NULL) \ +{ \ + if (resource != NULL) { \ free(resource); \ - resource = NULL; \ + resource = NULL; \ + } \ } void