|
@@ -83,11 +83,14 @@ int corex_append_branch(sip_msg_t *msg, gparam_t *pu, gparam_t *pq)
|
|
pkg_free(msg->dst_uri.s);
|
|
pkg_free(msg->dst_uri.s);
|
|
msg->dst_uri.s = 0;
|
|
msg->dst_uri.s = 0;
|
|
msg->dst_uri.len = 0;
|
|
msg->dst_uri.len = 0;
|
|
- if(msg->path_vec.s!=0)
|
|
|
|
- if (likely(msg->path_vec.s >= msg->buf && (msg->path_vec.s < (msg->buf + msg->len))))
|
|
|
|
|
|
+
|
|
|
|
+ /* if this is a cloned message, don't free the path vector as it was copied into shm memory and will be freed as contiguous block*/
|
|
|
|
+ if (!(msg->msg_flags&FL_SHM_CLONE)) {
|
|
|
|
+ if(msg->path_vec.s!=0)
|
|
pkg_free(msg->path_vec.s);
|
|
pkg_free(msg->path_vec.s);
|
|
- msg->path_vec.s = 0;
|
|
|
|
- msg->path_vec.len = 0;
|
|
|
|
|
|
+ msg->path_vec.s = 0;
|
|
|
|
+ msg->path_vec.len = 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return ret;
|
|
return ret;
|