commit | d06cd4a76504b5e254c23954b560972657858bca | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Mon Aug 01 17:57:50 2022 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Aug 01 17:57:50 2022 +0000 |
tree | dc69fe76a37bab1db551458d5a06394b144d0d1e | |
parent | 27b3ad2c7805a330153450be6abd03aa41654f00 [diff] | |
parent | f305560b12248817e10d0cf3b939fb8dddd757e2 [diff] |
Merge "Always free after getline()."
diff --git a/libc/bionic/sysinfo.cpp b/libc/bionic/sysinfo.cpp index 897ef30..1e4a0e8 100644 --- a/libc/bionic/sysinfo.cpp +++ b/libc/bionic/sysinfo.cpp
@@ -44,8 +44,8 @@ size_t allocated_size = 0; if (getline(&line, &allocated_size, fp) != -1) { cpu_count = GetCpuCountFromString(line); - free(line); } + free(line); fclose(fp); } return cpu_count;