andrey                                   Thu, 29 Apr 2010 15:17:44 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=298779

Log:
Fix valgrind warning, usage of nirvana memory

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c  2010-04-29 13:42:01 UTC 
(rev 298778)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c  2010-04-29 15:17:44 UTC 
(rev 298779)
@@ -1842,7 +1842,6 @@
        chg_user_resp = 
conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE 
TSRMLS_CC);
        ret = PACKET_READ(chg_user_resp, conn);
        conn->error_info = chg_user_resp->error_info;
-       PACKET_FREE(chg_user_resp);

        if (conn->error_info.error_no) {
                ret = FAIL;
@@ -1876,6 +1875,7 @@
                DBG_ERR(mysqlnd_old_passwd);
                SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, 
UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
        }
+       PACKET_FREE(chg_user_resp);

        SET_ERROR_AFF_ROWS(conn);


Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2010-04-29 13:42:01 UTC (rev 
298778)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c     2010-04-29 15:17:44 UTC (rev 
298779)
@@ -1842,7 +1842,6 @@
        chg_user_resp = 
conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE 
TSRMLS_CC);
        ret = PACKET_READ(chg_user_resp, conn);
        conn->error_info = chg_user_resp->error_info;
-       PACKET_FREE(chg_user_resp);

        if (conn->error_info.error_no) {
                ret = FAIL;
@@ -1876,6 +1875,7 @@
                DBG_ERR(mysqlnd_old_passwd);
                SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, 
UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
        }
+       PACKET_FREE(chg_user_resp);

        SET_ERROR_AFF_ROWS(conn);


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

Reply via email to