Skip to content

Commit

Permalink
watchfrr: Fail gracefully if fopen fails
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Dec 5, 2017
1 parent 116e176 commit f5ba21f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion watchfrr/watchfrr.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ static void daemon_send_ready(void)
FILE *fp;

fp = fopen(DAEMON_VTY_DIR "/watchfrr.started", "w");
fclose(fp);
if (fp)
fclose(fp);
#if defined HAVE_SYSTEMD
zlog_notice(
"Watchfrr: Notifying Systemd we are up and running");
Expand Down

0 comments on commit f5ba21f

Please sign in to comment.