File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -104,19 +104,33 @@ static int pdo_dblib_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC)
104
104
dbcancel (H -> link );
105
105
106
106
if (stmt -> columns ) {
107
+ int i = 0 ;
108
+ for (; i < stmt -> column_count ; i ++ ) {
109
+ if (stmt -> columns [i ].name ) {
110
+ efree (stmt -> columns [i ].name );
111
+ }
112
+ }
107
113
efree (stmt -> columns );
108
114
stmt -> columns = NULL ;
109
115
}
110
-
116
+
111
117
return 1 ;
112
118
}
113
119
114
120
static int pdo_dblib_stmt_dtor (pdo_stmt_t * stmt TSRMLS_DC )
115
121
{
116
122
pdo_dblib_stmt * S = (pdo_dblib_stmt * )stmt -> driver_data ;
117
123
118
- efree (stmt -> columns );
119
- stmt -> columns = NULL ;
124
+ if (stmt -> columns ) {
125
+ int i = 0 ;
126
+ for (; i < stmt -> column_count ; i ++ ) {
127
+ if (stmt -> columns [i ].name ) {
128
+ efree (stmt -> columns [i ].name );
129
+ }
130
+ }
131
+ efree (stmt -> columns );
132
+ stmt -> columns = NULL ;
133
+ }
120
134
121
135
efree (S );
122
136
You can’t perform that action at this time.
0 commit comments