Skip to content

Commit d19e52e

Browse files
committed
fix: pgsqlSetNoticeCallback: ADDREF on non ref counted
Core dumped when using a string callable.
1 parent d95976c commit d19e52e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pdo_pgsql/pgsql_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ static PHP_METHOD(PDO, pgsqlSetNoticeCallback)
11861186
H->notice_callback = NULL;
11871187
RETURN_FALSE;
11881188
}
1189-
Z_ADDREF_P(&fc->fci.function_name);
1189+
Z_TRY_ADDREF_P(&fc->fci.function_name);
11901190
zend_string_release_ex(cbname, 0);
11911191

11921192
H->notice_callback = fc;

0 commit comments

Comments
 (0)