Leak if this is ever called a second time.  Should <code> free(ctx->launch_directory); <code> or <code> assert(!ctx->launch_directory); </code> first.