diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1999-04-27 13:10:32 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1999-04-27 13:10:32 -0400 |
commit | a4a7d3a32615c1ea52c41ff149e291417fa1bdc8 (patch) | |
tree | 6cfdf5b2f8be8a0afd688b6b0c5e0c98bf19d542 /src/LYNews.c | |
parent | a08d955fa4048b5b5522919a7b36b800b0dda4aa (diff) | |
download | lynx-snapshots-a4a7d3a32615c1ea52c41ff149e291417fa1bdc8.tar.gz |
snapshot of project "lynx", label v2-8-2dev_25
Diffstat (limited to 'src/LYNews.c')
-rw-r--r-- | src/LYNews.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/LYNews.c b/src/LYNews.c index d5106bb7..1b27f644 100644 --- a/src/LYNews.c +++ b/src/LYNews.c @@ -37,7 +37,7 @@ PRIVATE BOOLEAN message_has_content ARGS1( filename ? filename : "(<null>)"); return FALSE; } - while ((buffer = LYSafeGets(buffer, fp)) != NULL) { + while (LYSafeGets(&buffer, fp) != NULL) { char *cp = buffer; char firstnonblank = '\0'; if (*cp == '\0') { @@ -70,6 +70,7 @@ PRIVATE BOOLEAN message_has_content ARGS1( in_headers = FALSE; } } + FREE(buffer); fclose(fp); return FALSE; } @@ -239,8 +240,8 @@ PUBLIC char *LYNewsPost ARGS2( StrAllocCat(cp, org); #ifndef VMS } else if ((fp = fopen("/etc/organization", "r")) != NULL) { - char *buffer; - if ((buffer = LYSafeGets(NULL, fp)) != NULL) { + char *buffer = 0; + if (LYSafeGets(&buffer, fp) != NULL) { if ((org = strchr(buffer, '\n')) != NULL) { *org = '\0'; } @@ -248,6 +249,7 @@ PUBLIC char *LYNewsPost ARGS2( StrAllocCat(cp, buffer); } } + FREE(buffer); fclose(fp); #endif /* !VMS */ } @@ -384,7 +386,7 @@ PUBLIC char *LYNewsPost ARGS2( if ((fd = LYAppendToTxtFile (my_tempfile)) != NULL) { char *buffer = NULL; fputs("-- \n", fd); - while ((buffer = LYSafeGets(buffer, fp)) != NULL) { + while (LYSafeGets(&buffer, fp) != NULL) { fputs(buffer, fd); } fclose(fd); @@ -406,7 +408,7 @@ PUBLIC char *LYNewsPost ARGS2( if (CJKfile[0] != '\0') { if ((fd = fopen(my_tempfile, "r")) != NULL) { char *buffer = NULL; - while ((buffer = LYSafeGets(buffer, fd)) != NULL) { + while (LYSafeGets(&buffer, fd) != NULL) { TO_JIS((unsigned char *)buffer, (unsigned char *)CJKinput); fputs(CJKinput, fc); |