andrey          Thu Feb 14 14:48:57 2008 UTC

  Modified files:              
    /php-src/ext/mysqlnd        mysqlnd_ps.c mysqlnd_wireprotocol.c 
  Log:
  Fix memory errors
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.12&r2=1.13&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.12 
php-src/ext/mysqlnd/mysqlnd_ps.c:1.13
--- php-src/ext/mysqlnd/mysqlnd_ps.c:1.12       Thu Feb 14 12:51:00 2008
+++ php-src/ext/mysqlnd/mysqlnd_ps.c    Thu Feb 14 14:48:57 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysqlnd_ps.c,v 1.12 2008/02/14 12:51:00 andrey Exp $ */
+/* $Id: mysqlnd_ps.c,v 1.13 2008/02/14 14:48:57 andrey Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -513,6 +513,8 @@
        }
        stmt->execute_count++;
 
+       CONN_SET_STATE(conn, CONN_QUERY_SENT);
+
        ret = mysqlnd_query_read_result_set_header(stmt->conn, stmt TSRMLS_CC);
        if (ret == FAIL) {
                stmt->error_info = conn->error_info;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.c?r1=1.11&r2=1.12&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.11 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.12
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.11     Thu Feb 14 12:51:00 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c  Thu Feb 14 14:48:57 2008
@@ -733,7 +733,7 @@
 void php_mysqlnd_auth_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 {
        if (!alloca) {
-               mnd_efree((php_mysql_packet_auth *) _packet);
+               mnd_pefree((php_mysql_packet_auth *) _packet, 
((php_mysql_packet_auth *)_packet)->header.persistent);
        }
 }
 /* }}} */
@@ -807,7 +807,7 @@
                p->message = NULL;
        }
        if (!alloca) {
-               mnd_efree(p);
+               mnd_pefree(p, p->header.persistent);
        }
 }
 /* }}} */
@@ -877,7 +877,7 @@
 void php_mysqlnd_eof_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 {
        if (!alloca) {
-               mnd_efree(_packet);
+               mnd_pefree(_packet, ((php_mysql_packet_eof 
*)_packet)->header.persistent);
        }
 }
 /* }}} */
@@ -949,7 +949,7 @@
 void php_mysqlnd_cmd_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 {
        if (!alloca) {
-               mnd_efree((php_mysql_packet_command *) _packet);
+               mnd_pefree(_packet, ((php_mysql_packet_command 
*)_packet)->header.persistent);
        }
 }
 /* }}} */
@@ -1036,7 +1036,7 @@
                p->info_or_local_file = NULL;
        }
        if (!alloca) {
-               mnd_efree(p);
+               mnd_pefree(p, p->header.persistent);
        }
 }
 /* }}} */
@@ -1227,7 +1227,7 @@
 
        /* p->metadata was passed to us as temporal buffer */
        if (!alloca) {
-               mnd_efree(p);
+               mnd_pefree(p, p->header.persistent);
        }
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to