aboutsummaryrefslogtreecommitdiff
path: root/contrib/file/magic/Magdir/frame
diff options
context:
space:
mode:
authorBojan Novković <bnovkov@FreeBSD.org>2026-02-23 15:30:26 +0000
committerBojan Novković <bnovkov@FreeBSD.org>2026-02-25 11:30:05 +0000
commitbce0c14fe19defeef4f02cfebc018e9adf979783 (patch)
tree26d542253975251f6bf7a88fac22ccb6c3585e92 /contrib/file/magic/Magdir/frame
parent3023bb49e115b4149f9fc0683dabde172ecb1336 (diff)
mpool/mpool_get.c: Avoid clobbering 'errno' when handling 'pread' errorsHEADmain
POSIX.1-2024 states that the 'free' function "shall not modify errno if ptr is a null pointer or a pointer previously returned as if by malloc() and not yet deallocated". However this is a fairly recent addition and non-compliant allocators might still clobber 'errno', causing 'mpool_get' to return the wrong error code. Fix this by saving and restoring 'errno' after calling 'free'. Sponsored by: Klara, Inc. Reviewed by: obiwac Differential Revision: https://reviews.freebsd.org/D55463 MFC after: 1 week
Diffstat (limited to 'contrib/file/magic/Magdir/frame')
0 files changed, 0 insertions, 0 deletions