diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2006-01-05 12:00:12 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-06 04:22:49 +0300 |
commit | d9e08be9d5b632aed84d4ee870543babafe6614b (patch) | |
tree | 7bd5e3696d0f562d9991b76be18a0959921813ee | |
parent | 781411ed46400f95c45c5ca103769288025b39d6 (diff) |
fix potential deadlock in create_one_file
It can happen if the temporary file already exists (i.e. after a panic
and reboot).
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | apply.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1635,7 +1635,8 @@ static void create_one_file(const char *path, unsigned mode, const char *buf, un } if (errno != EEXIST) break; - } + ++nr; + } } die("unable to write file %s mode %o", path, mode); } |