Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libselinux: store_stem(): do not free possible non-heap object
GCC 11 complains: In file included from label_file.c:24: In function ‘store_stem’, inlined from ‘load_mmap’ at label_file.c:277:12, inlined from ‘process_file’ at label_file.c:551:5: label_file.h:289:25: error: ‘free’ called on pointer ‘*mmap_area.next_addr’ with nonzero offset 4 [-Werror=free-nonheap-object] 289 | free(buf); | ^~~~~~~~~ Free the pointer on failure at the caller instead of inside `store_stem()`. Signed-off-by: Christian Göttsche <[email protected]>
- Loading branch information