Check that the reference count is valid (i.e. non-negative) on each call to ref_get() and ref_put(), using an assert() at the point of use. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
31 | 31 |
|
32 | 32 |
|
33 | 33 |
|
34 |
|
|
35 | 34 |
|
36 | 35 |
|
37 | 36 |
|
38 |
|
|
37 |
|
|
39 | 38 |
|
40 | 39 |
|
41 |
|
|
40 |
|
|
42 | 41 |
|
43 |
|
|
42 |
|
|
44 | 43 |
|
45 |
|
|
46 | 44 |
|
47 | 45 |
|
48 | 46 |
|
|
||
55 | 53 |
|
56 | 54 |
|
57 | 55 |
|
58 |
|
|
56 |
|
|
59 | 57 |
|
60 | 58 |
|
61 | 59 |
|
62 | 60 |
|
63 |
|
|
61 |
|
|
64 | 62 |
|
65 |
|
|
63 |
|
|
66 | 64 |
|
67 |
|
|
65 |
|
|
68 | 66 |
|
69 | 67 |
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
70 | 78 |
|
71 | 79 |
|
72 | 80 |
|
|
||
9 | 9 |
|
10 | 10 |
|
11 | 11 |
|
12 |
|
|
13 |
|
|
14 |
|
|
12 | 15 |
|
13 | 16 |
|
14 | 17 |
|
|
||
26 | 29 |
|
27 | 30 |
|
28 | 31 |
|
29 |
|
|
32 |
|
|
30 | 33 |
|
31 | 34 |
|
32 | 35 |
|
|
||
75 | 78 |
|
76 | 79 |
|
77 | 80 |
|
78 |
|
|
79 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
80 | 112 |
|
81 | 113 |
|
82 | 114 |
|