[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] com =?UTF-8?Q?pecl/database/ibm=5Fdb=32=3A=20Fix=20memory=20leak=20bindin?= =?UTF-8?Q?g=2
From:       Calvin Buckley <calvinb () php ! net>
Date:       2020-12-14 21:15:34
Message-ID: php-mail-aafbd2b0f7805900cc3474c1f1d55022163546833 () git ! php ! net
[Download RAW message or body]

Commit:    e6efb27be0056dd959d8e783a88f82968b24c19c
Author:    Calvin Buckley <calvin@cmpct.info>         Mon, 14 Dec 2020 16:15:34 -0500
Parents:   19487f6c6698d621d94757d851e782cae9e70fca
Branches:  master

Link:       http://git.php.net/?p=pecl/database/ibm_db2.git;a=commitdiff;h=e6efb27be0056dd959d8e783a88f82968b24c19c


Log:
Fix memory leak binding values

A temporary buffer is allocated in some scenarios (copied from
another value when binding), but it never gets freed.

Changed paths:
  M  ibm_db2.c


Diff:
diff --git a/ibm_db2.c b/ibm_db2.c
index b1f7088..7a5d154 100644
--- a/ibm_db2.c
+++ b/ibm_db2.c
@@ -572,6 +572,7 @@ static void _php_db2_free_result_struct(stmt_handle* handle)
             if( prev_ptr->param_type != DB2_PARAM_OUT && prev_ptr->param_type != \
DB2_PARAM_INOUT ) {  if (prev_ptr->value) {
                     zval_ptr_dtor(prev_ptr->value);
+                    efree(prev_ptr->value);
                 }
             }
             efree(prev_ptr);


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic