Skip to content

Commit c9aed87

Browse files
committed
Merge branch 'PHP-7.0'
* PHP-7.0: Removed invalid efree() (arguments are allocated on VM stack and used without copying)
2 parents 74daa98 + c7c3b96 commit c9aed87

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

ext/interbase/ibase_events.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,14 @@ PHP_FUNCTION(ibase_wait_event)
143143

144144
if (Z_TYPE(args[0]) == IS_RESOURCE) {
145145
if ((ib_link = (ibase_db_link *)zend_fetch_resource2_ex(&args[0], "InterBase link", le_link, le_plink)) == NULL) {
146-
efree(args);
147146
RETURN_FALSE;
148147
}
149148
i = 1;
150149
} else {
151150
if (ZEND_NUM_ARGS() > 15) {
152-
efree(args);
153151
WRONG_PARAM_COUNT;
154152
}
155153
if ((ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), "InterBase link", le_link, le_plink)) == NULL) {
156-
efree(args);
157154
RETURN_FALSE;
158155
}
159156
}
@@ -170,7 +167,6 @@ PHP_FUNCTION(ibase_wait_event)
170167
if (isc_wait_for_event(IB_STATUS, &ib_link->handle, buffer_size, event_buffer, result_buffer)) {
171168
_php_ibase_error();
172169
_php_ibase_event_free(event_buffer,result_buffer);
173-
efree(args);
174170
RETURN_FALSE;
175171
}
176172

@@ -180,15 +176,13 @@ PHP_FUNCTION(ibase_wait_event)
180176
if (occurred_event[i]) {
181177
zend_string *result = zend_string_init(events[i], strlen(events[i]), 0);
182178
_php_ibase_event_free(event_buffer,result_buffer);
183-
efree(args);
184179
RETURN_STR(result);
185180
}
186181
}
187182

188183
/* If we reach this line, isc_wait_for_event() did return, but we don't know
189184
which event fired. */
190185
_php_ibase_event_free(event_buffer,result_buffer);
191-
efree(args);
192186
RETURN_FALSE;
193187
}
194188
/* }}} */

0 commit comments

Comments
 (0)