|
@@ -1414,9 +1414,12 @@ static void *kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos)
|
|
++(*pos);
|
|
++(*pos);
|
|
|
|
|
|
list_for_each_continue_rcu(n, &object_list) {
|
|
list_for_each_continue_rcu(n, &object_list) {
|
|
- next_obj = list_entry(n, struct kmemleak_object, object_list);
|
|
|
|
- if (get_object(next_obj))
|
|
|
|
|
|
+ struct kmemleak_object *obj =
|
|
|
|
+ list_entry(n, struct kmemleak_object, object_list);
|
|
|
|
+ if (get_object(obj)) {
|
|
|
|
+ next_obj = obj;
|
|
break;
|
|
break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
put_object(prev_obj);
|
|
put_object(prev_obj);
|