Browse code

dispatcher: check if packing address fails on removing via rpc

- GH #3199

(cherry picked from commit 13a4021914057ca66eaa91e2ea022e1827963b70)

Daniel-Constantin Mierla authored on 04/08/2022 09:50:50
Showing 1 changed files
... ...
@@ -2680,6 +2680,11 @@ int ds_remove_dst(int group, str *address)
2680 2680
 	setn = 0;
2681 2681
 
2682 2682
 	dp = pack_dest(*address, 0, 0, NULL, 0);
2683
+	if(dp==NULL) {
2684
+		LM_ERR("failed to pack address: %d %.*s\n", group,
2685
+				address->len, address->s);
2686
+		return -1;
2687
+	}
2683 2688
 	filter_arg.setid = group;
2684 2689
 	filter_arg.dest = dp;
2685 2690
 	filter_arg.setn = &setn;