Skip to content

Commit 65f8857

Browse files
authored
Drop useless retrieval of opened_path (GH-16522)
There is no point in retrieving the real path, if we don't use it.
1 parent eef3e5e commit 65f8857

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/dba/dba.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -823,14 +823,10 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent)
823823
} else {
824824
spprintf(&lock_name, 0, "%s.lck", ZSTR_VAL(connection->info->path));
825825
if (!strcmp(file_mode, "r")) {
826-
zend_string *opened_path = NULL;
827826
/* when in read only mode try to use existing .lck file first */
828827
/* do not log errors for .lck file while in read only mode on .lck file */
829828
lock_file_mode = "rb";
830-
connection->info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, &opened_path);
831-
if (opened_path) {
832-
zend_string_release_ex(opened_path, 0);
833-
}
829+
connection->info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, NULL);
834830
}
835831
if (!connection->info->lock.fp) {
836832
/* when not in read mode or failed to open .lck file read only. now try again in create(write) mode and log errors */

0 commit comments

Comments
 (0)