Module: sip-router
Branch: master
Commit: 9e756aea4884b6e9f0dd359bb4a935fc3fed1e75
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9e756ae…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: Tue Mar 18 22:10:09 2014 +0100
core: Minor bug-fix: Only free path vector, if it contains data
---
parser/msg_parser.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/parser/msg_parser.c b/parser/msg_parser.c
index fbd4ddb..6f72cdc 100644
--- a/parser/msg_parser.c
+++ b/parser/msg_parser.c
@@ -831,7 +831,8 @@ void reset_path_vector(struct sip_msg* const msg)
{
/* only free path vector from pkg IFF it is still in pkg... - ie. if msg is shm we
don't free... */
if (!(msg->msg_flags&FL_SHM_CLONE)) {
- pkg_free(msg->path_vec.s);
+ if (msg->path_vec.s)
+ pkg_free(msg->path_vec.s);
msg->path_vec.s = 0;
msg->path_vec.len = 0;
}