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

Showing the changes to include/linux (1 of 1 file). Show all

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
3030
3131 static inline void ceph_buffer_put(struct ceph_buffer *b)
3232 {
33− kref_put(&b->kref, ceph_buffer_release);
33+ if (b)
34+ kref_put(&b->kref, ceph_buffer_release);
3435 }
3536
3637 extern 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