|
@@ -286,7 +286,7 @@ static int kvp_key_delete(int pool, const __u8 *key, int key_size)
|
|
* Found a match; just move the remaining
|
|
* Found a match; just move the remaining
|
|
* entries up.
|
|
* entries up.
|
|
*/
|
|
*/
|
|
- if (i == num_records) {
|
|
|
|
|
|
+ if (i == (num_records - 1)) {
|
|
kvp_file_info[pool].num_records--;
|
|
kvp_file_info[pool].num_records--;
|
|
kvp_update_file(pool);
|
|
kvp_update_file(pool);
|
|
return 0;
|
|
return 0;
|