libgit2 / libgit2

A cross-platform, linkable library implementation of Git that you can use in your application.

Home Page:https://libgit2.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libgit2 tries to close an invalid file descriptor when using OpenSSH

boretrk opened this issue · comments

libgit2 tries to close an invalid file descriptor when using OpenSSH

Reproduction steps

The automatic tests generates this behavior for:
Linux (Xenial, GCC, mbedTLS, OpenSSH)
Linux (Xenial, Clang, OpenSSL, OpenSSH)

https://github.com/libgit2/libgit2/actions/runs/7215018549/job/19658420551

8: ==9753== Command: /home/libgit2/build/libgit2_tests -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh -sonline::clone::ssh_auth_methods

8: ==9753== Warning: invalid file descriptor -1 in syscall close()

Expected behavior

I would expect it not not close invalid file descriptors.

Actual behavior

It tries to close invalid file descriptors.

Version of libgit2 (release number or SHA1)

b4e84a7

Operating system(s) tested

Linux (Xenial, GCC, mbedTLS, OpenSSH)
Linux (Xenial, Clang, OpenSSL, OpenSSH)

Thanks for the nudge. I had seen this and been meaning to investigate.