CVS update: php3/functions
| From: | thies | Date: | Thu, 22 Apr 1999 11:19:40 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5202@lists.php.net to get a copy of this message | ||
Date: Thursday April 22, 1999 @ 7:19
Author: thies
Update of /repository/php3/functions
In directory php:/tmp/cvs-serv12214
Modified Files:
oracle.c
Log Message:
fixed memory leak in ora_bind
Index: php3/functions/oracle.c
diff -c php3/functions/oracle.c:1.96 php3/functions/oracle.c:1.97
*** php3/functions/oracle.c:1.96 Thu Apr 22 05:49:26 1999
--- php3/functions/oracle.c Thu Apr 22 07:19:40 1999
***************
*** 30,36 ****
+----------------------------------------------------------------------+
*/
! /* $Id: oracle.c,v 1.96 1999/04/22 09:49:26 thies Exp $ */
#if defined(COMPILE_DL)
# if PHP_31
--- 30,36 ----
+----------------------------------------------------------------------+
*/
! /* $Id: oracle.c,v 1.97 1999/04/22 11:19:40 thies Exp $ */
#if defined(COMPILE_DL)
# if PHP_31
***************
*** 777,782 ****
--- 777,794 ----
}
/* }}} */
+ static void
+ pval_ora_param_destructor(oraParam *param)
+ {
+ if (! param) {
+ return;
+ }
+
+ if (param->progv) {
+ efree(param->progv);
+ }
+ }
+
/* {{{ proto int ora_bind(int cursor, string php_variable_name, string sql_parameter_name, int
length [, int type])
Bind a PHP variable to an Oracle parameter */
void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS)
***************
*** 808,816 ****
cursor->params = (HashTable *)emalloc(sizeof(HashTable));
if (!cursor->params ||
_php3_hash_init(cursor->params, 19, NULL,
! NULL, 0) ==
! /* (void (*)(void *))pval_ora_param_destructor, 0) == */
! FAILURE){
php3_error(E_ERROR, "Unable to initialize parameter list");
RETURN_FALSE;
}
--- 820,826 ----
cursor->params = (HashTable *)emalloc(sizeof(HashTable));
if (!cursor->params ||
_php3_hash_init(cursor->params, 19, NULL,
! (void (*)(void *))pval_ora_param_destructor, 0) == FAILURE) {
php3_error(E_ERROR, "Unable to initialize parameter list");
RETURN_FALSE;
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net