fix the bug! because the jpg_read don't free the memory