File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir)
9494
9595 /* Is the proposed open_basedir at least as restrictive as the current setting? */
9696 smart_string buf = {0 };
97- ptr = pathbuf = estrdup ( ZSTR_VAL (new_value ) );
97+ ptr = pathbuf = ZSTR_VAL (new_value );
9898 while (ptr && * ptr ) {
9999 end = strchr (ptr , DEFAULT_DIR_SEPARATOR );
100100 if (end != NULL ) {
@@ -103,13 +103,11 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir)
103103 }
104104 char resolved_name [MAXPATHLEN + 1 ];
105105 if (expand_filepath (ptr , resolved_name ) == NULL ) {
106- efree (pathbuf );
107106 smart_string_free (& buf );
108107 return FAILURE ;
109108 }
110109 if (php_check_open_basedir_ex (resolved_name , 0 ) != 0 ) {
111110 /* At least one portion of this open_basedir is less restrictive than the prior one, FAIL */
112- efree (pathbuf );
113111 smart_string_free (& buf );
114112 return FAILURE ;
115113 }
@@ -119,7 +117,6 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir)
119117 smart_string_appends (& buf , resolved_name );
120118 ptr = end ;
121119 }
122- efree (pathbuf );
123120
124121 /* Everything checks out, set it */
125122 smart_string_0 (& buf );
You can’t perform that action at this time.
0 commit comments