[PATCH 4.19 232/323] ftrace: Check if pages were allocated before calling free_pages()