Commit 41a07bd2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Catch two other return cases from smf_init() so we don't close

the storage file by accident.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2786 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ca6c4e26
......@@ -274,6 +274,7 @@ smf_init(struct stevedore *parent, const char *spec)
sc->fd = open(p, O_RDWR | O_CREAT | O_EXCL, 0600);
if (sc->fd >= 0) {
sc->filename = p;
mgt_child_inherit(sc->fd, "storage_file");
smf_initfile(sc, size, 1);
return;
}
......@@ -310,6 +311,7 @@ smf_init(struct stevedore *parent, const char *spec)
exit (2);
}
sc->filename = p;
mgt_child_inherit(sc->fd, "storage_file");
smf_initfile(sc, size, 0);
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment