diff options
Diffstat (limited to 'unix-socket.c')
| -rw-r--r-- | unix-socket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unix-socket.c b/unix-socket.c index 79800d8063..8860203c3f 100644 --- a/unix-socket.c +++ b/unix-socket.c @@ -1,3 +1,5 @@ +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "git-compat-util.h" #include "strbuf.h" #include "unix-socket.h" @@ -63,8 +65,10 @@ static int unix_sockaddr_init(struct sockaddr_un *sa, const char *path, if (strbuf_getcwd(&cwd)) return -1; ctx->orig_dir = strbuf_detach(&cwd, NULL); - if (chdir_len(dir, slash - dir) < 0) + if (chdir_len(dir, slash - dir) < 0) { + FREE_AND_NULL(ctx->orig_dir); return -1; + } } memset(sa, 0, sizeof(*sa)); |
