Skip to content
Commit 589506f1 authored by Li RongQing's avatar Li RongQing Committed by Ilya Dryomov
Browse files

libceph: fix a use after free issue in osdmap_set_max_osd



If the state variable is krealloced successfully, map->osd_state will be
freed, once following two reallocation failed, and exit the function
without resetting map->osd_state, map->osd_state become a wild pointer.

fix it by resetting them after krealloc successfully.

Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
parent dc220db0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment