File tree 1 file changed +11
-25
lines changed
1 file changed +11
-25
lines changed Original file line number Diff line number Diff line change @@ -1187,6 +1187,17 @@ PHP_FUNCTION(proc_open)
1187
1187
}
1188
1188
}
1189
1189
1190
+ if (1 ) {
1191
+ RETVAL_RES (zend_register_resource (proc , le_proc_open ));
1192
+ } else {
1193
+ exit_fail :
1194
+ _php_free_envp (env );
1195
+ if (command ) {
1196
+ efree (command );
1197
+ }
1198
+ RETVAL_FALSE ;
1199
+ }
1200
+
1190
1201
#ifdef PHP_WIN32
1191
1202
free (cwdw );
1192
1203
free (cmdw );
@@ -1202,34 +1213,9 @@ PHP_FUNCTION(proc_open)
1202
1213
close (pty_slave_fd );
1203
1214
}
1204
1215
#endif
1205
- efree (descriptors );
1206
- ZVAL_RES (return_value , zend_register_resource (proc , le_proc_open ));
1207
- return ;
1208
-
1209
- exit_fail :
1210
1216
if (descriptors ) {
1211
1217
efree (descriptors );
1212
1218
}
1213
- _php_free_envp (env );
1214
- if (command ) {
1215
- efree (command );
1216
- }
1217
- #ifdef PHP_WIN32
1218
- free (cwdw );
1219
- free (cmdw );
1220
- free (envpw );
1221
- #else
1222
- efree_argv (argv );
1223
- #endif
1224
- #if HAVE_OPENPTY
1225
- if (pty_master_fd != -1 ) {
1226
- close (pty_master_fd );
1227
- }
1228
- if (pty_slave_fd != -1 ) {
1229
- close (pty_slave_fd );
1230
- }
1231
- #endif
1232
- RETURN_FALSE ;
1233
1219
}
1234
1220
/* }}} */
1235
1221
You can’t perform that action at this time.
0 commit comments