utils: fix lxc_p{close,open}()
If a file descriptor fd is opened by fdopen() and associated with a stream f
will **not** have been dup()ed. This means that fclose(f) will also close the
fd. So never call close(fd) after fdopen(fd) succeeded.
This fixes a double close() Stéphane and I observed when debugging on aarch64
and armf.
Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
Showing
Please
register
or
sign in
to comment