Mercurial > hg > freeDiameter
comparison libfdproto/messages.c @ 1205:165569e8cba8
Allow NULL parameter in fd_msg_free
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 14 Jun 2013 17:29:17 +0800 |
parents | d0a7b76a3c1c |
children | c38bb8b69c43 |
comparison
equal
deleted
inserted
replaced
1204:a4cdde705f30 | 1205:165569e8cba8 |
---|---|
704 /* Free an object and its tree */ | 704 /* Free an object and its tree */ |
705 int fd_msg_free ( msg_or_avp * object ) | 705 int fd_msg_free ( msg_or_avp * object ) |
706 { | 706 { |
707 TRACE_ENTRY("%p", object); | 707 TRACE_ENTRY("%p", object); |
708 | 708 |
709 if (object == NULL) | |
710 return 0; | |
711 | |
709 if (CHECK_MSG(object)) { | 712 if (CHECK_MSG(object)) { |
710 if (_M(object)->msg_query) { | 713 if (_M(object)->msg_query) { |
711 _M(_M(object)->msg_query)->msg_associated = 0; | 714 _M(_M(object)->msg_query)->msg_associated = 0; |
712 CHECK_FCT( fd_msg_free( _M(object)->msg_query ) ); | 715 CHECK_FCT( fd_msg_free( _M(object)->msg_query ) ); |
713 _M(object)->msg_query = NULL; | 716 _M(object)->msg_query = NULL; |