Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ext/mri/bcrypt_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ static VALUE bc_crypt(VALUE self, VALUE key, VALUE setting) {
value = bc_crypt_nogvl((void *)&args);
#endif

if(!value || !args.data) return Qnil;
if(!value || !args.data) {
free(args.data);
return Qnil;
}

out = rb_str_new2(value);

Expand Down