1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 07:08:19 +00:00

Merge pull request #2104 from matrix/keyboard_layout_1

(keyboard_layout) remove unused *rc* vars, change free with hcfree
This commit is contained in:
Jens Steube 2019-07-29 15:02:34 +02:00 committed by GitHub
commit 97b5b723c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,13 +48,11 @@ bool initialize_keyboard_layout_mapping (const char *filename, keyboard_layout_m
token.sep[1] = 0x09;
token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH;
const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, (const int) line_len, &token);
if (rc_tokenizer != PARSER_OK)
if (input_tokenizer ((const u8 *) line_buf, (const int) line_len, &token) != PARSER_OK)
{
hc_fclose (&fp);
free (line_buf);
hcfree (line_buf);
return false;
}
@ -69,7 +67,7 @@ bool initialize_keyboard_layout_mapping (const char *filename, keyboard_layout_m
{
hc_fclose (&fp);
free (line_buf);
hcfree (line_buf);
return false;
}
@ -81,7 +79,7 @@ bool initialize_keyboard_layout_mapping (const char *filename, keyboard_layout_m
hc_fclose (&fp);
free (line_buf);
hcfree (line_buf);
// we need to sort this by length to ensure the largest blocks come first in mapping