CVS update: php3/functions

From: Date: Sun, 25 Apr 1999 17:00:21 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-5255@lists.php.net to get a copy of this message
Date: Sunday April 25, 1999 @ 13:00 Author: thies Update of /repository/php3/functions In directory php:/tmp/cvs-serv3542/functions Modified Files: oracle.c Log Message: fixed mem-leak (not in the "niced" way).... this needs more fixing Index: php3/functions/oracle.c diff -u php3/functions/oracle.c:1.100 php3/functions/oracle.c:1.101 --- php3/functions/oracle.c:1.100 Sun Apr 25 12:26:41 1999 +++ php3/functions/oracle.c Sun Apr 25 13:00:21 1999 @@ -30,7 +30,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oracle.c,v 1.100 1999/04/25 16:26:41 thies Exp $ */ +/* $Id: oracle.c,v 1.101 1999/04/25 17:00:21 thies Exp $ */ #if defined(COMPILE_DL) # if PHP_31 @@ -1471,11 +1471,11 @@ convert_to_long(arg); if ((cursor = ora_get_cursor(list, arg->value.lval)) != NULL) { return_value->type = IS_STRING; - return_value->value.str.val = ora_error(&cursor->cda); + return_value->value.str.val = estrdup(ora_error(&cursor->cda)); return_value->value.str.len = strlen(return_value->value.str.val); } else if ((conn = ora_get_conn(list, arg->value.lval)) != NULL) { return_value->type = IS_STRING; - return_value->value.str.val = ora_error(&conn->lda); + return_value->value.str.val = estrdup(ora_error(&conn->lda)); return_value->value.str.len = strlen(return_value->value.str.val); } } @@ -1578,9 +1578,8 @@ ora_error(Cda_Def * cda) { sword n, l; - text *errmsg; + static text errmsg[ 512 ]; - errmsg = (text *) emalloc(512); n = oerhms(cda, cda->rc, errmsg, 400); /* remove the last newline */ -- 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

« previous php.dev (#5255) next »