]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: Add free_check() helper
authorSimon Horman <horms@verge.net.au>
Fri, 30 Jan 2015 02:22:55 +0000 (11:22 +0900)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 Feb 2015 23:24:15 +0000 (00:24 +0100)
Add free_check() helper to free the memory allocated by init_check().

Signed-off-by: Simon Horman <horms@verge.net.au>
include/proto/checks.h
src/checks.c

index 1e65652eb7f6ca9cc42f681ea0b08a5a4bfdc078..24dec79f8af78c91224c0bea187a722dadbb6298 100644 (file)
@@ -45,6 +45,7 @@ static inline void health_adjust(struct server *s, short status)
 }
 
 const char *init_check(struct check *check, int type);
+void free_check(struct check *check);
 
 #endif /* _PROTO_CHECKS_H */
 
index ae981f8fb97e0c9185b1cafec3a43c7e830019e9..b2f89a55657023c025277bb011bfeac4e02cf081 100644 (file)
@@ -2807,6 +2807,13 @@ const char *init_check(struct check *check, int type)
        return NULL;
 }
 
+void free_check(struct check *check)
+{
+       free(check->bi);
+       free(check->bo);
+       free(check->conn);
+}
+
 
 /*
  * Local variables: