MEDIUM: Add free_check() helper
Add free_check() helper to free the memory allocated by init_check(). Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
b1900d55df
commit
bfb5d33fe6
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue