Browse Source

ntpd and bgpd's turn to behave like the others.

ok henning@
OPENBSD_4_3
pyr 17 years ago
parent
commit
bf599d131d
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/usr.sbin/ntpd/parse.y

+ 5
- 3
src/usr.sbin/ntpd/parse.y View File

@ -1,4 +1,4 @@
/* $OpenBSD: parse.y,v 1.39 2007/10/16 20:01:23 mpf Exp $ */
/* $OpenBSD: parse.y,v 1.40 2007/10/20 14:24:02 pyr Exp $ */
/* /*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -548,9 +548,12 @@ pushfile(const char *name)
struct file *nfile; struct file *nfile;
if ((nfile = calloc(1, sizeof(struct file))) == NULL || if ((nfile = calloc(1, sizeof(struct file))) == NULL ||
(nfile->name = strdup(name)) == NULL)
(nfile->name = strdup(name)) == NULL) {
log_warn("malloc");
return (NULL); return (NULL);
}
if ((nfile->stream = fopen(nfile->name, "r")) == NULL) { if ((nfile->stream = fopen(nfile->name, "r")) == NULL) {
log_warn("%s", nfile->name);
free(nfile->name); free(nfile->name);
free(nfile); free(nfile);
return (NULL); return (NULL);
@ -588,7 +591,6 @@ parse_config(const char *filename, struct ntpd_conf *xconf)
TAILQ_INIT(&conf->ntp_conf_sensors); TAILQ_INIT(&conf->ntp_conf_sensors);
if ((file = pushfile(filename)) == NULL) { if ((file = pushfile(filename)) == NULL) {
log_warn("%s", filename);
return (-1); return (-1);
} }


Loading…
Cancel
Save