summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Semyonov <linulin@gmail.com>2010-04-21 20:32:41 +0530
committerMukund Sivaraman <muks@banu.com>2010-04-21 20:35:50 +0530
commit7edb6e047c4314ac7031d817fb06107e2c39c7c7 (patch)
treeb5ca96e75c7268a7ef89bdde7d3ba7ec601ad2ae
parentd30ee746a7e2f0bea365ab7cf99bcc82bd020acc (diff)
downloadtinyproxy-7edb6e047c4314ac7031d817fb06107e2c39c7c7.tar.gz
tinyproxy-7edb6e047c4314ac7031d817fb06107e2c39c7c7.zip
Fix crash in send_stored_logs()
Diffstat (limited to '')
-rw-r--r--src/log.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/log.c b/src/log.c
index 0fdbcb5..e0f3567 100644
--- a/src/log.c
+++ b/src/log.c
@@ -206,11 +206,12 @@ void send_stored_logs (void)
{
char *string;
char *ptr;
-
int level;
-
size_t i;
+ if (log_message_storage == NULL)
+ return;
+
log_message(LOG_DEBUG, "sending stored logs");
for (i = 0; (ssize_t) i != vector_length (log_message_storage); ++i) {