aboutsummaryrefslogtreecommitdiffstats
path: root/mail2.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-03-03 03:47:04 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-03-03 03:47:04 +0000
commit9ef4282e9e32e857f4d0cac9df6d58f2cba159f4 (patch)
tree723676ea31fe0615b4d0caca1491e5a21fe85c7a /mail2.c
parentd0b39b590e56b191394cfcb6b8690de0fbd87957 (diff)
downloadlcd4linux-9ef4282e9e32e857f4d0cac9df6d58f2cba159f4.tar.gz
[lcd4linux @ 2004-03-03 03:47:04 by reinelt]
big patch from Martin Hejl: - use qprintf() where appropriate - save CPU cycles on gettimeofday() - add quit() functions to free allocated memory - fixed lots of memory leaks git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@384 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'mail2.c')
-rw-r--r--mail2.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/mail2.c b/mail2.c
index 4de52ad..63cc604 100644
--- a/mail2.c
+++ b/mail2.c
@@ -1,4 +1,4 @@
-/* $Id: mail2.c,v 1.12 2004/01/30 20:57:56 reinelt Exp $
+/* $Id: mail2.c,v 1.13 2004/03/03 03:47:04 reinelt Exp $
*
* mail: pop3, imap, news functions
*
@@ -22,6 +22,13 @@
*
*
* $Log: mail2.c,v $
+ * Revision 1.13 2004/03/03 03:47:04 reinelt
+ * big patch from Martin Hejl:
+ * - use qprintf() where appropriate
+ * - save CPU cycles on gettimeofday()
+ * - add quit() functions to free allocated memory
+ * - fixed lots of memory leaks
+ *
* Revision 1.12 2004/01/30 20:57:56 reinelt
* HD44780 patch from Martin Hejl
* dmalloc integrated
@@ -221,16 +228,18 @@ static int check_nntp(char *user, char *pass, char *machine,
int err;
int totg, unsg;
int first;
+ char *s;
*total = 0;
*unseen = 0;
- strcpy(buf, cfg_get(NULL, "Newsrc", ".newsrc"));
+ strcpy(buf, (s=cfg_get(NULL, "Newsrc", ".newsrc")));
if (*buf == 0 || ((fp = fopen(buf, "r")) == NULL)) {
error("Couldn't open .newsrc-file '%s'", buf);
+ free(s);
return -1;
}
-
+ free(s);
fd = open_socket(machine, port);
if (fd < 0)
{