ソースを参照

pua: check if local requests are dropped and free the param

(cherry picked from commit 53e1a29c265df1489c9bd91deddc0719f8ca2092)
Daniel-Constantin Mierla 1 年間 前
コミット
244319c67a
2 ファイル変更8 行追加0 行削除
  1. 5 0
      src/modules/pua/pua.c
  2. 3 0
      src/modules/pua/send_publish.c

+ 5 - 0
src/modules/pua/pua.c

@@ -700,6 +700,11 @@ int update_pua(ua_pres_t *p)
 			ret_code = -1;
 			ret_code = -1;
 			goto done;
 			goto done;
 		}
 		}
+		if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
+			shm_free(cb_param);
+			ret_code = 0;
+			goto done;
+		}
 	} else {
 	} else {
 		str met = {"SUBSCRIBE", 9};
 		str met = {"SUBSCRIBE", 9};
 		ua_pres_t *cb_param = NULL;
 		ua_pres_t *cb_param = NULL;

+ 3 - 0
src/modules/pua/send_publish.c

@@ -624,6 +624,9 @@ send_publish:
 		LM_ERR("in t_request tm module function\n");
 		LM_ERR("in t_request tm module function\n");
 		goto error;
 		goto error;
 	}
 	}
+	if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
+		shm_free(cb_param);
+	}
 
 
 done:
 done:
 	ret = 0;
 	ret = 0;