6936168: Recent fix for unmapping stack guard pages doesn't close /proc/self/maps
Add close to returns (fix for 6929067 also contributed by aph) Co-authored-by: Andreas Kohn <andreas.kohn@fredhopper.com> Reviewed-by: aph, dcubed, andrew, acorn
This commit is contained in:
parent
2450ae35a1
commit
87f44737a8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user