Skip to content

Commit 88e2844

Browse files
committed
Use safe dtor for previous and message
1 parent a3b1160 commit 88e2844

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Zend/zend_exceptions.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ ZEND_METHOD(Exception, __construct)
321321

322322
if (message) {
323323
zval *tmp = zend_obj_prop_num_checked(Z_OBJ_P(object), 0, ZSTR_KNOWN(ZEND_STR_MESSAGE));
324-
zval_ptr_dtor(tmp);
324+
zval_ptr_safe_dtor(tmp);
325325
ZVAL_STR_COPY(tmp, message);
326326
}
327327

@@ -333,7 +333,7 @@ ZEND_METHOD(Exception, __construct)
333333

334334
if (previous) {
335335
zval *tmp = zend_obj_prop_num_checked(Z_OBJ_P(object), 6, ZSTR_KNOWN(ZEND_STR_PREVIOUS));
336-
zval_ptr_dtor(tmp);
336+
zval_ptr_safe_dtor(tmp);
337337
ZVAL_COPY(tmp, previous);
338338
}
339339
}
@@ -374,7 +374,7 @@ ZEND_METHOD(ErrorException, __construct)
374374

375375
if (message) {
376376
zval *tmp = zend_obj_prop_num_checked(Z_OBJ_P(object), 0, ZSTR_KNOWN(ZEND_STR_MESSAGE));
377-
zval_ptr_dtor(tmp);
377+
zval_ptr_safe_dtor(tmp);
378378
ZVAL_STR_COPY(tmp, message);
379379
}
380380

@@ -386,7 +386,7 @@ ZEND_METHOD(ErrorException, __construct)
386386

387387
if (previous) {
388388
zval *tmp = zend_obj_prop_num_checked(Z_OBJ_P(object), 6, ZSTR_KNOWN(ZEND_STR_PREVIOUS));
389-
zval_ptr_dtor(tmp);
389+
zval_ptr_safe_dtor(tmp);
390390
ZVAL_COPY(tmp, previous);
391391
}
392392

0 commit comments

Comments
 (0)