提交 8b2acdb5 编写于 作者: C coleenp

6936168: Recent fix for unmapping stack guard pages doesn't close /proc/self/maps

Summary: Add close to returns (fix for 6929067 also contributed by aph)
Reviewed-by: aph, dcubed, andrew, acorn
Contributed-by: aph@redhat.com, andreas.kohn@fredhopper.com
上级 a816b394
......@@ -2528,6 +2528,7 @@ get_stack_bounds(uintptr_t *bottom, uintptr_t *top)
char *str = NULL;
ssize_t len = getline(&str, &dummy, f);
if (len == -1) {
fclose(f);
return false;
}
......@@ -2543,14 +2544,14 @@ get_stack_bounds(uintptr_t *bottom, uintptr_t *top)
uintptr_t sp = (uintptr_t)__builtin_frame_address(0);
if (sp >= *bottom && sp <= *top) {
free(str);
fclose(f);
return true;
}
}
}
free(str);
}
fclose(f);
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册