BUG/MINOR: tcp/http: release the expr of set-{src,dst}[-port]

Release the expression used by the set-{src,dst}[-port] actions so we
keep valgrind happy upon an exit or an haproxy -c.

Could be backported in every supported version.

(cherry picked from commit 0164a40c59e1c1ceb3661d29cbbe8fb7d988cbc3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0fc218e0ffa6cf8c08c50070a5b9001a503732f2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/tcp_act.c b/src/tcp_act.c
index d55475c..211280c 100644
--- a/src/tcp_act.c
+++ b/src/tcp_act.c
@@ -236,6 +236,14 @@
 	return ACT_RET_ABRT;
 }
 
+/*
+ * Release the sample expr when releasing a set src/dst action
+ */
+static void release_set_src_dst_action(struct act_rule *rule)
+{
+	release_sample_expr(rule->arg.expr);
+}
+
 /* parse "set-{src,dst}[-port]" action */
 static enum act_parse_ret tcp_parse_set_src_dst(const char **args, int *orig_arg, struct proxy *px,
                                                 struct act_rule *rule, char **err)
@@ -277,6 +285,7 @@
 		return ACT_RET_PRS_ERR;
 	}
 
+	rule->release_ptr = release_set_src_dst_action;
 	(*orig_arg)++;
 
 	return ACT_RET_PRS_OK;