- pointer can end up being NULL if replacement fails to be built (e.g., via topoh) (cherry picked from commit c2b0be97a3ef8e4e1bff34a5c73328a63979aa61) (cherry picked from commit 555537769f5ecbf8dacc3de7529da05bfbdd3d04)
@@ -143,6 +143,11 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
outb.len = len;
sr_event_exec(SREV_NET_DATA_OUT, (void*)&outb);
+ if(outb.s==NULL) {
+ LM_ERR("failed to update outgoing buffer\n");
+ return -1;
+ }
+
#ifdef USE_TCP
if (unlikely((dst->proto == PROTO_WS
#ifdef USE_TLS