summaryrefslogtreecommitdiff
path: root/ext/dba/dba_dbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dba/dba_dbm.c')
-rw-r--r--ext/dba/dba_dbm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index 0eea524ccb..5763fad41e 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -79,6 +79,10 @@ DBA_OPEN_FUNC(dbm)
}
info->dbf = ecalloc(sizeof(dba_dbm_data), 1);
+ if (!info->dbf) {
+ *error = "Out of memory";
+ return FAILURE;
+ }
return SUCCESS;
}