Skip to content

Commit bc8aa7d

Browse files
committed
Use free_obj in IMAP\Connection
Looks like this incorrect pattern was copied from the FTP implementation.
1 parent d982f4e commit bc8aa7d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/imap/php_imap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ static void imap_object_destroy(zend_object *zobj) {
193193
efree(IMAPG(imap_password));
194194
IMAPG(imap_password) = 0;
195195
}
196+
197+
zend_object_std_dtor(zobj);
196198
}
197199

198200
#define GET_IMAP_STREAM(imap_conn_struct, zval_imap_obj) \
@@ -485,7 +487,7 @@ PHP_MINIT_FUNCTION(imap)
485487
memcpy(&imap_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
486488
imap_object_handlers.offset = XtOffsetOf(php_imap_object, std);
487489
imap_object_handlers.get_constructor = imap_object_get_constructor;
488-
imap_object_handlers.dtor_obj = imap_object_destroy;
490+
imap_object_handlers.free_obj = imap_object_destroy;
489491
imap_object_handlers.clone_obj = NULL;
490492

491493
/* lets allow NIL */

0 commit comments

Comments
 (0)