summaryrefslogtreecommitdiff
path: root/src/stats.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-08 18:58:37 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-09-08 18:58:37 +0000
commit0668e42e8f5ce3d900218233e35de64905026cac (patch)
tree0a8f5ce953763cf81d78d51d31263712b9d8da1b /src/stats.c
parentd5253ec5f435b26c50ca4cb649d3f47b800cbbd8 (diff)
downloadtinyproxy-0668e42e8f5ce3d900218233e35de64905026cac.tar.gz
tinyproxy-0668e42e8f5ce3d900218233e35de64905026cac.zip
Changed all the mallocs and callocs to use the new safemalloc and
safecalloc.
Diffstat (limited to '')
-rw-r--r--src/stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stats.c b/src/stats.c
index 2cd6ec1..593555b 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -1,4 +1,4 @@
-/* $Id: stats.c,v 1.4 2001-05-27 02:26:53 rjkaes Exp $
+/* $Id: stats.c,v 1.5 2001-09-08 18:58:37 rjkaes Exp $
*
* This module handles the statistics for tinyproxy. There are only two
* public API functions. The reason for the functions, rather than just a
@@ -25,6 +25,7 @@
#include "log.h"
#include "stats.h"
+#include "utils.h"
struct stat_s {
unsigned long int num_reqs;
@@ -72,7 +73,7 @@ int showstats(struct conn_s *connptr)
"Number of refused connections due to high load: %lu\r\n" \
"</blockquote>\r\n</body></html>\r\n";
- connptr->output_message = malloc(MAXBUFFSIZE);
+ connptr->output_message = safemalloc(MAXBUFFSIZE);
if (!connptr->output_message) {
log_message(LOG_CRIT, "Out of memory!");
return -1;