diff options
-rw-r--r-- | openbsc/src/gprs/gtphub_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gtphub_main.c b/openbsc/src/gprs/gtphub_main.c index f56c44622..bfb0a3d9e 100644 --- a/openbsc/src/gprs/gtphub_main.c +++ b/openbsc/src/gprs/gtphub_main.c @@ -166,8 +166,10 @@ static uint8_t next_restart_count(const char *path) goto failed_to_write; if (fprintf(f, "%" PRIu8 "\n", counter) < 2) goto failed_to_write; - if (fclose(f)) + if (fclose(f)) { + f = NULL; goto failed_to_write; + } umask(umask_was); |