tools/xenstore: get_handle: Allocate struct before opening fd
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 Sep 2017 12:44:50 +0000 (13:44 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 11 Oct 2017 11:51:22 +0000 (12:51 +0100)
commitedf4af67047c0b829227205b75f63764d3478d32
tree4ebb650f5cd03efc9a1c25b8a1d6636bf2eb08e2
parent0e318c7b354dcd5347f7c327231f2b47cba7d7e0
tools/xenstore: get_handle: Allocate struct before opening fd

Now we can also abolish the temporary local variable "fd" and simply
use h->fd.

This ordering is necessary to be able to call
xentoolcore__register_active_handle sensibly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xenstore/xs.c