Skip to content

Commit 58b4738

Browse files
committed
Fix: leaked
1 parent 810927d commit 58b4738

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kernel/excel.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,11 @@ PHP_METHOD(vtiful_xls, insertDate)
566566
type_writer(&_zv_double_time, row, column, &obj->write_ptr, format, obj->format_ptr.format);
567567
}
568568

569-
zend_string_release(format);
569+
// Release default format
570+
if (ZEND_NUM_ARGS() == 3) {
571+
zend_string_release(format);
572+
}
573+
570574
zval_ptr_dtor(&_zv_double_time);
571575
}
572576
/* }}} */

0 commit comments

Comments
 (0)