cvs: php4 /ext/dba dba_gdbm.c
| From: | Marcus B�rger | Date: | Tue, 05 Nov 2002 19:38:06 +0000 |
| Subject: | cvs: php4 /ext/dba dba_gdbm.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-15836@lists.php.net to get a copy of this message | ||
helly Tue Nov 5 14:38:06 2002 EDT
Modified files:
/php4/ext/dba dba_gdbm.c
Log:
correct errors
Index: php4/ext/dba/dba_gdbm.c
diff -u php4/ext/dba/dba_gdbm.c:1.13 php4/ext/dba/dba_gdbm.c:1.14
--- php4/ext/dba/dba_gdbm.c:1.13 Tue Nov 5 09:46:36 2002
+++ php4/ext/dba/dba_gdbm.c Tue Nov 5 14:38:06 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_gdbm.c,v 1.13 2002/11/05 14:46:36 helly Exp $ */
+/* $Id: dba_gdbm.c,v 1.14 2002/11/05 19:38:06 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -60,10 +60,15 @@
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;
}