RE: [PHP-DEV] pg_close()/msql_close()/sybase_close()
| From: | Matt McClanahan | Date: | Sat, 04 Nov 2000 05:47:09 +0000 |
| Subject: | RE: [PHP-DEV] pg_close()/msql_close()/sybase_close() | ||
| References: | 1 | Groups: | php.dev php.qa |
| Request: | Send a blank email to php-dev+get-37108@lists.php.net to get a copy of this message | ||
On Fri, 3 Nov 2000, Mike Robinson wrote:
> > Woah, that ought to be an OLD bug. I fixed it in the CVS.
> > Did anybody ever try using mSQL under PHP 4.0? :)
> >
> > Zeev
>
> Well thats the strange thing, because though I don't use mSQL
> much, I do normally compile in it just so I can confirm bugs or
> give install feedback to QA. I was sure it was fine. Damn gremlins.
> :)
For what it's worth, I happened to have an old Debian 1.3 server sitting
around with mSQL 2.0.1 on it, so I gave it a look.
Works fine in PHP 4.0.1pl2. After looking over the cvs log, it should
work through 4.0.3 as well. Then in the mega-patch to get resource type
information from the modules, the parameter to _delete_query
(php_msql.c:119) changed, but not the efree() call.
Quick fix, here's my patch.
Matt
Index: php_msql.c
===================================================================
RCS file: /repository/php4/ext/msql/php_msql.c,v
retrieving revision 1.26
diff -u -r1.26 php_msql.c
--- php_msql.c 2000/11/03 02:46:49 1.26
+++ php_msql.c 2000/11/04 05:38:04
@@ -121,7 +121,7 @@
m_query *query = (m_query *)rsrc->ptr;
if(query->result) msqlFreeResult(query->result);
- efree(arg);
+ efree(rsrc->ptr);
}
static m_query *php_msql_query_wrapper(m_result *res, int af_rows)