ff_alloc_picture: free tables in case of dimension mismatches