aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Finkel <Matthew.Finkel@gmail.com>2015-02-09 01:58:22 +0000
committerMatthew Finkel <Matthew.Finkel@gmail.com>2015-02-09 02:06:18 +0000
commit9ae321db66cf83453b34c75d889599ea4a75642b (patch)
treec25ec0a21d30eb1b45b7138e9b5cfa19e94f610b /src
parent7cbdec578b291da11dcd419988ee985b7589ec48 (diff)
downloadtor-9ae321db66cf83453b34c75d889599ea4a75642b.tar.gz
tor-9ae321db66cf83453b34c75d889599ea4a75642b.zip
Return 0 when detecting the amount of memory fails
Fixes bug 14802; bugfix on 0.2.5.4-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index e25ecc462d..3eda1ca00d 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -3517,7 +3517,7 @@ get_total_system_memory_impl(void)
size_t len = sizeof(memsize);
int mib[2] = {CTL_HW, HW_USERMEM};
if (sysctl(mib,2,&memsize,&len,NULL,0))
- return -1;
+ return 0;
return memsize;