summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pptpd/ppp/ppp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c
index 4b472ff..a30fa81 100644
--- a/accel-pptpd/ppp/ppp.c
+++ b/accel-pptpd/ppp/ppp.c
@@ -596,8 +596,10 @@ static void save_seq(void)
opt = "/var/run/accel-pptp/seq";
f = fopen(opt, "w");
- fprintf(f, "%llu", sid);
- fclose(f);
+ if (f) {
+ fprintf(f, "%llu", sid);
+ fclose(f);
+ }
}
static void __init init(void)