mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Tools: hv: Fix a bug in the key delete code
Fix a bug in the key delete code - the num_records range from 0 to num_records-1. Signed-off-by: K. Y. Srinivasan <[email protected]> Reported-by: David Binderman <[email protected]> Cc: <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
c55e931887
commit
86503bd35d
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ static int kvp_key_delete(int pool, const __u8 *key, int key_size)
|
|||
* Found a match; just move the remaining
|
||||
* entries up.
|
||||
*/
|
||||
if (i == num_records) {
|
||||
if (i == (num_records - 1)) {
|
||||
kvp_file_info[pool].num_records--;
|
||||
kvp_update_file(pool);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue