Skip to content

Commit 12fc060

Browse files
committed
fix: pgsqlSetNoticeCallback: ADDREF on non ref counted
Core dumped when using a string callable.
1 parent 44f5d81 commit 12fc060

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
@@ -1193,7 +1193,7 @@ static PHP_METHOD(PDO, pgsqlSetNoticeCallback)
11931193
H->notice_callback = NULL;
11941194
RETURN_FALSE;
11951195
}
1196-
Z_ADDREF_P(&fc->fci.function_name);
1196+
Z_TRY_ADDREF_P(&fc->fci.function_name);
11971197
zend_string_release_ex(cbname, 0);
11981198

11991199
H->notice_callback = fc;

0 commit comments

Comments
 (0)