From f998590e5b02ca7e0d2224c600a877c93a3ab2e9 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 29 May 2012 15:38:03 +0200 Subject: [PATCH] Don't stomp on errno. --- src/common/compat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/compat.c b/src/common/compat.c index 6c833f163c..c18b4177f9 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -1654,7 +1654,8 @@ alloc_getcwd(void) path = tor_realloc(path, path_length); } else { tor_free(path); - return NULL; + path = NULL; + break; } } errno = saved_errno;