History

libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer

Luis Henriques committed 7 years ago

Commit 5c498951 parent d1abaeb1 file · +2 −1Browse files

Unified · Split

include/linux/ceph/buffer.h+2−1
@@ -30,7 +30,8 @@ static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b) · 29 unmodified lines
30 30
31static inline void ceph_buffer_put(struct ceph_buffer *b)31static 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
36extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);37extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t