diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-07-27 15:01:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-27 15:01:36 -0700 |
commit | e5498e8a9f9a596ecff78426bbf904626cd7863a (patch) | |
tree | 0d8f2d6df322847817a42cc371c78984125a3190 /path.c | |
parent | c4818faf81d32d940c58ab209f83b6049b33ecbb (diff) | |
parent | 593ce2bea5dad436e87b5dd37c205961d73feae9 (diff) | |
download | git-e5498e8a9f9a596ecff78426bbf904626cd7863a.tar.gz |
Sync with 1.7.0 series
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -316,6 +316,8 @@ char *expand_user_path(const char *path) size_t username_len = first_slash - username; if (username_len == 0) { const char *home = getenv("HOME"); + if (!home) + goto return_null; strbuf_add(&user_path, home, strlen(home)); } else { struct passwd *pw = getpw_str(username, username_len); |