Skip to content

Commit

Permalink
Properly initialize variable
Browse files Browse the repository at this point in the history
Not all code paths assign to `handle`, even though it may be used, so
we make sure that it is initialized to a sane value in the first place.
  • Loading branch information
cmb69 committed May 5, 2019
1 parent a760c79 commit 30409d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/ffi/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2926,7 +2926,7 @@ ZEND_METHOD(FFI, load) /* {{{ */
size_t code_size, scope_name_len;
zend_ffi *ffi;
zend_bool preload = (CG(compiler_options) & ZEND_COMPILE_PRELOAD) != 0;
DL_HANDLE handle;
DL_HANDLE handle = NULL;
zend_ffi_scope *scope = NULL;
zend_string *name;
zend_ffi_symbol *sym;
Expand Down

0 comments on commit 30409d6

Please sign in to comment.