From 589506f1e7f135943bcd34903bcdcf1fdaf00549 Mon Sep 17 00:00:00 2001 From: Li RongQing Date: Sun, 7 Sep 2014 18:10:51 +0800 Subject: [PATCH] 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-format-patch failed