From: Li RongQing Date: Sun, 7 Sep 2014 10:10:51 +0000 (+0800) Subject: libceph: fix a use after free issue in osdmap_set_max_osd X-Git-Tag: omap-for-v3.19/prcm-cleanup~68^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=589506f1e7f135943bcd34903bcdcf1fdaf00549;p=pandora-kernel.git 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 Signed-off-by: Ilya Dryomov --- Reading git-diff-tree failed