Browse Source

Don't stomp on errno.

Linus Nordberg 12 years ago
parent
commit
f998590e5b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/common/compat.c

+ 2 - 1
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;