From 36a0ea60d220a7edc0c83b73ad1867fd347ca77e Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 12 Oct 2013 16:10:04 +0300 Subject: Handle eventual out-of-memory conditions. --- src/binlog.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/binlog.c') diff --git a/src/binlog.c b/src/binlog.c index 6f438a8..b2d9f87 100644 --- a/src/binlog.c +++ b/src/binlog.c @@ -209,12 +209,14 @@ vmod_init(struct sess *sp, struct vmod_priv *priv, AN(conf->dir); conf->inst_head = packcomp(dataspec, &p); + AN(conf->inst_head); if (*p) { binlog_error("cannot compile data format near %s", p); abort(); } conf->recsize = packsize(conf->inst_head); conf->env = packenv_create(conf->recsize); + AN(conf->env); conf->recsize += offsetof(struct binlog_record,data); conf->dataspec = strdup(dataspec); AN(conf->dataspec); -- cgit v1.2.1