]> granicus.if.org Git - php/commitdiff
Fixed memory leak.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 7 Jul 2005 15:54:00 +0000 (15:54 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 7 Jul 2005 15:54:00 +0000 (15:54 +0000)
ext/pdo_mysql/mysql_statement.c

index 31b26f4ed84d8b9f3b7a16379c840e11e8b5aa62..c59f53c8dbc8f903f46cacac26e02b525aeae8db 100755 (executable)
@@ -55,7 +55,13 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
                efree(S->in_null);
                efree(S->in_length);
        }
-       if (S->bound_result) {
+       if (S->bound_result) 
+       {
+               int i;
+               for (i = 0; i < stmt->column_count; i++) {
+                       efree(S->bound_result[i].buffer);
+               }
+       
                efree(S->bound_result);
                efree(S->out_null);
                efree(S->out_length);