diff options
| author | Marcus Boerger <helly@php.net> | 2002-11-05 14:46:36 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2002-11-05 14:46:36 +0000 |
| commit | 177b24a44ee3b0ff39889a1ef1f896edf559a389 (patch) | |
| tree | a72933d329f02221d61f564caa9c4423e7cb6a5f /ext/dba/dba_db3.c | |
| parent | 41a77bccba8f597d694f5b66b289f1bba6529a26 (diff) | |
| download | php-git-177b24a44ee3b0ff39889a1ef1f896edf559a389.tar.gz | |
Why did open fail?
Diffstat (limited to 'ext/dba/dba_db3.c')
| -rw-r--r-- | ext/dba/dba_db3.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index edade52042..5dd3af58f7 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -66,7 +66,7 @@ DBA_OPEN_FUNC(db3) info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1; if (gmode == -1) - return FAILURE; + return FAILURE; /* not possible */ if (info->argc > 0) { convert_to_long_ex(info->argv[0]); @@ -78,6 +78,10 @@ DBA_OPEN_FUNC(db3) dba_db3_data *data; data = emalloc(sizeof(*data)); + if (!data) { + *error = "Out of memory"; + return FAILURE; + } data->dbp = dbp; data->cursor = NULL; info->dbf = data; |
