@@ -493,12 +493,15 @@ static void firebird_handle_closer(pdo_dbh_t *dbh) /* {{{ */
493
493
494
494
if (H -> date_format ) {
495
495
efree (H -> date_format );
496
+ H -> date_format = NULL ;
496
497
}
497
498
if (H -> time_format ) {
498
499
efree (H -> time_format );
500
+ H -> time_format = NULL ;
499
501
}
500
502
if (H -> timestamp_format ) {
501
503
efree (H -> timestamp_format );
504
+ H -> timestamp_format = NULL ;
502
505
}
503
506
504
507
pefree (H , dbh -> is_persistent );
@@ -882,6 +885,7 @@ static bool firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *
882
885
}
883
886
if (H -> date_format ) {
884
887
efree (H -> date_format );
888
+ H -> date_format = NULL ;
885
889
}
886
890
spprintf (& H -> date_format , 0 , "%s" , ZSTR_VAL (str ));
887
891
zend_string_release_ex (str , 0 );
@@ -896,6 +900,7 @@ static bool firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *
896
900
}
897
901
if (H -> time_format ) {
898
902
efree (H -> time_format );
903
+ H -> time_format = NULL ;
899
904
}
900
905
spprintf (& H -> time_format , 0 , "%s" , ZSTR_VAL (str ));
901
906
zend_string_release_ex (str , 0 );
@@ -910,6 +915,7 @@ static bool firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *
910
915
}
911
916
if (H -> timestamp_format ) {
912
917
efree (H -> timestamp_format );
918
+ H -> timestamp_format = NULL ;
913
919
}
914
920
spprintf (& H -> timestamp_format , 0 , "%s" , ZSTR_VAL (str ));
915
921
zend_string_release_ex (str , 0 );
0 commit comments