mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ceph: fix possible NULL pointer dereference
This patch fixes 'event_work' dereference before it is checked for NULL. Signed-off-by: Mariusz Kozlowski <[email protected]> Signed-off-by: Sage Weil <[email protected]>
This commit is contained in:
parent
ef550f6f4f
commit
6b0ae4097c
1 changed files with 1 additions and 1 deletions
|
|
@ -1602,11 +1602,11 @@ void handle_watch_notify(struct ceph_osd_client *osdc, struct ceph_msg *msg)
|
|||
cookie, ver, event);
|
||||
if (event) {
|
||||
event_work = kmalloc(sizeof(*event_work), GFP_NOIO);
|
||||
INIT_WORK(&event_work->work, do_event_work);
|
||||
if (!event_work) {
|
||||
dout("ERROR: could not allocate event_work\n");
|
||||
goto done_err;
|
||||
}
|
||||
INIT_WORK(&event_work->work, do_event_work);
|
||||
event_work->event = event;
|
||||
event_work->ver = ver;
|
||||
event_work->notify_id = notify_id;
|
||||
|
|
|
|||
Loading…
Reference in a new issue