summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-04-03 19:56:49 +0000
committerBrian Somers <brian@FreeBSD.org>2000-04-03 19:56:49 +0000
commit2a8e2fe6697072f3f88b48ce1cf925fb22827c1b (patch)
treef37f7eaa08a5606015ea492503c96264fa0c3dac
parent881048943390d6e5a88cc0c5fb88da73dfb688cc (diff)
Notes
-rw-r--r--usr.sbin/ppp/systems.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index bea245288ee8..a51491cbf1bf 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -349,8 +349,10 @@ ReadSystem(struct bundle *bundle, const char *name, const char *file,
log_Printf(LogCOMMAND, "%s: Including \"%s\"\n", filename, arg);
n = ReadSystem(bundle, name, arg, prompt, cx, how);
log_Printf(LogCOMMAND, "%s: Done include of \"%s\"\n", filename, arg);
- if (!n)
+ if (!n) {
+ fclose(fp);
return 0; /* got it */
+ }
break;
default:
log_Printf(LogWARN, "%s: %s: Invalid command\n", filename, cp);
@@ -364,8 +366,10 @@ ReadSystem(struct bundle *bundle, const char *name, const char *file,
if (strcmp(cp, name) == 0) {
/* We're in business */
- if (how == SYSTEM_EXISTS)
+ if (how == SYSTEM_EXISTS) {
+ fclose(fp);
return 0;
+ }
while ((n = xgets(line, sizeof line, fp))) {
linenum += n;
indent = issep(*line);