X-Git-Url: http://git.wpitchoune.net/gitweb/?p=ppastats.git;a=blobdiff_plain;f=src%2Fhtml.c;h=ea013b68fbc2fe7767be634b07ec200a330d6ad8;hp=379a9c15e742ca6bd48095d3abf410ab76d1048c;hb=3fdf52a7dba9c3bcbd6e4ef8b945c6d91fc1d807;hpb=9a8af404ffbfb331575dc4b37b044d49d728be8b diff --git a/src/html.c b/src/html.c index 379a9c1..ea013b6 100644 --- a/src/html.c +++ b/src/html.c @@ -30,19 +30,19 @@ #include #include "html.h" -#include "log.h" #include "lp.h" #include #include "lp_ws.h" #include "ppastats.h" #include +#include #include -static const char *footer; -static const char *ppa_body; -static const char *pkg_body; -static const char *pkg_version_body; -static const char *header; +static char *footer; +static char *ppa_body; +static char *pkg_body; +static char *pkg_version_body; +static char *header; static char *path_new(const char *dir, const char *file, const char *suffixe) { @@ -447,6 +447,7 @@ version_to_html(struct ppa_stats *ppa, create_html(path, f_name, body, script); + free(script); free(json); free(path); free(f_name); @@ -566,3 +567,12 @@ ppa_to_html(const char *owner, free(path); } + +void html_cleanup() +{ + free(header); + free(footer); + free(ppa_body); + free(pkg_body); + free(pkg_version_body); +}