Unified · Split
| @@ -30,7 +30,8 @@ static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b) · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | static inline void ceph_buffer_put(struct ceph_buffer *b) |
| 32 | 32 | { |
| 33 | − kref_put(&b->kref, ceph_buffer_release); | |
| 33 | + if (b) | |
| 34 | + kref_put(&b->kref, ceph_buffer_release); | |
| 34 | 35 | } |
| 35 | 36 | |
| 36 | 37 | extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end); |