Add a NULL check.

This commit is contained in:
Hiroki Sato 2016-12-20 04:05:21 +00:00
parent 27efdcd869
commit 2e0ef629ee

View File

@ -532,6 +532,8 @@ main(int argc, char *argv[])
if (bflag == 0) {
pe = calloc(1, sizeof(*pe));
if (pe == NULL)
err(1, "malloc failed");
*pe = (struct peer) {
.pe_serv = "syslog"
};