File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -4282,15 +4282,15 @@ PHP_FUNCTION(getopt)
4282
4282
/* the first <len> slots are filled by the one short ops
4283
4283
* we now extend our array and jump to the new added structs */
4284
4284
opts = (opt_struct * ) erealloc (opts , sizeof (opt_struct ) * (len + count + 1 ));
4285
- if (!opts ) {
4286
- RETURN_FALSE ;
4287
- }
4288
-
4289
4285
orig_opts = opts ;
4290
4286
opts += len ;
4291
4287
4292
4288
memset (opts , 0 , count * sizeof (opt_struct ));
4293
4289
4290
+ if (!opts ) {
4291
+ RETURN_FALSE ;
4292
+ }
4293
+
4294
4294
/* Reset the array indexes. */
4295
4295
zend_hash_internal_pointer_reset (Z_ARRVAL_P (p_longopts ));
4296
4296
@@ -4327,10 +4327,6 @@ PHP_FUNCTION(getopt)
4327
4327
}
4328
4328
} else {
4329
4329
opts = (opt_struct * ) erealloc (opts , sizeof (opt_struct ) * (len + 1 ));
4330
- if (!opts ) {
4331
- RETURN_FALSE ;
4332
- }
4333
-
4334
4330
orig_opts = opts ;
4335
4331
opts += len ;
4336
4332
}
You can’t perform that action at this time.
0 commit comments