fix double-free bug

ctx->content with GD is allocated
when ictx->complete is set 1.