From: Marcus Boerger Date: Tue, 5 Nov 2002 19:38:06 +0000 (+0000) Subject: correct errors X-Git-Tag: php-4.3.0RC1~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3ab4ece8d67418fa2667167cf8992feb7f0623a;p=php correct errors --- diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index 49cf088f78..9343685d3b 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -60,10 +60,15 @@ DBA_OPEN_FUNC(gdbm) if(dbf) { info->dbf = ecalloc(sizeof(dba_gdbm_data), 1); + if (!info->dbf) { + *error = "Out of memory"; + gdbm_close(dbf); + return FAILURE; + } ((dba_gdbm_data *) info->dbf)->dbf = dbf; return SUCCESS; } - *error = "Out of memory"; + *error = gdbm_strerror(gdbm_errno); return FAILURE; }