summaryrefslogtreecommitdiffabout
path: root/src/binlog.c
authorSergey Poznyakoff <gray@gnu.org.ua>2013-10-12 13:10:04 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-10-12 13:10:04 (GMT)
commit36a0ea60d220a7edc0c83b73ad1867fd347ca77e (patch) (side-by-side diff)
treece6a227382a2d3ec6ca0da05f66cfdf3eb01b2ff /src/binlog.c
parentb6678bb65fce1f64e82cc049aae3d7ba6f8aa19c (diff)
downloadvmod-binlog-36a0ea60d220a7edc0c83b73ad1867fd347ca77e.tar.gz
vmod-binlog-36a0ea60d220a7edc0c83b73ad1867fd347ca77e.tar.bz2
Handle eventual out-of-memory conditions.
Diffstat (limited to 'src/binlog.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/binlog.c2
1 files changed, 2 insertions, 0 deletions
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);

Return to:

Send suggestions and report system problems to the System administrator.