commit | 589506f1e7f135943bcd34903bcdcf1fdaf00549 | [log] [tgz] |
---|---|---|
author | Li RongQing <roy.qing.li@gmail.com> | Sun Sep 07 18:10:51 2014 +0800 |
committer | Ilya Dryomov <idryomov@redhat.com> | Tue Oct 14 21:03:21 2014 +0400 |
tree | e592366a1c1d59e8ca1085fd13a06ebc506420d1 | |
parent | dc220db03f15c9875aa09c36beba582f20c76be1 [diff] |
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: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>