Fix crash when gdraw_bitmap sets xi->data to allocated buffer.

Because memory for newdata comes from strange malloc(), it cannot be freed with free() or crash occurs.  Therefore, newdata must be kept in scope until after the call to gdraw_xbitmap(), and xi->data then set to NULL if it matches.