nobbie Wed Mar 5 04:38:00 2003 EDT
Modified files:
/php4/ext/informix ifx.ec
Log:
- Changed malloc() and free() to emalloc() and efree()
Index: php4/ext/informix/ifx.ec
diff -u php4/ext/informix/ifx.ec:1.86 php4/ext/informix/ifx.ec:1.87
--- php4/ext/informix/ifx.ec:1.86 Thu Feb 27 03:59:15 2003
+++ php4/ext/informix/ifx.ec Wed Mar 5 04:37:59 2003
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ifx.ec,v 1.86 2003/02/27 08:59:15 nobbie Exp $ */
+/* $Id: ifx.ec,v 1.87 2003/03/05 09:37:59 nobbie Exp $ */
/* -------------------------------------------------------------------
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -308,7 +308,7 @@
EXEC SQL close database;
EXEC SQL DISCONNECT CURRENT;
}
- free(link);
+ efree(link);
IFXG(num_persistent)--;
IFXG(num_links)--;
}
@@ -495,7 +495,7 @@
}
/* create the link */
- ifx = (char *) malloc(sizeof(IFX));
+ ifx = (char *) emalloc(sizeof(IFX));
IFXG(connectionid)++;
sprintf(ifx, "%s%x", SAFE_STRING(user), IFXG(connectionid));
@@ -504,7 +504,7 @@
if (ifx_check() == IFX_ERROR) {
IFXG(sv_sqlcode) = SQLCODE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s",
ifx_error(ifx));
- free(ifx);
+ efree(ifx);
efree(hashed_details);
RETURN_FALSE;
}
@@ -513,7 +513,7 @@
new_le.type = le_plink;
new_le.ptr = ifx;
if (zend_hash_update(&EG(persistent_list), hashed_details,
hashed_details_length + 1, (void *) &new_le, sizeof(list_entry), NULL) == FAILURE) {
- free(ifx);
+ efree(ifx);
efree(hashed_details);
RETURN_FALSE;
}
@@ -2406,7 +2406,7 @@
php_printf("<td>%s</td>", nullstr);
} else {
/* need an extra byte for string
terminator */
- copy_content = malloc(lg + 1);
+ copy_content = emalloc(lg + 1);
if (copy_content == NULL) {
php_error_docref(NULL
TSRMLS_CC, E_WARNING, "Not enough memory for TEXT column");
RETURN_FALSE;
@@ -2414,7 +2414,7 @@
memcpy(copy_content, content, lg);
copy_content[lg] = 0;
php_printf("<td>%s</td>",
copy_content);
- free(copy_content);
+ efree(copy_content);
}
break;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php