diff options
author | Steve McIntyre <steve@einval.com> | 2023-01-22 13:05:10 +0000 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2023-01-22 13:05:10 +0000 |
commit | 2dd2f7600d41253fe621b8d040ab57f0c202d71b (patch) | |
tree | 603ffd3c05d9935fd879bb073f6d3edc672139cf /model.c | |
parent | e6ace38abd705fbe24349152b7c90d473404e86e (diff) | |
download | efi-boot-shim-upstream/15.7.tar.gz efi-boot-shim-upstream/15.7.zip |
New upstream version 15.7upstream/15.7
Diffstat (limited to 'model.c')
-rw-r--r-- | model.c | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -8,16 +8,18 @@ /* This is so vim's Syntastic checker won't yell about all these. */ extern void __coverity_string_size_sanitize__(int); extern void __coverity_negative_sink__(int); -extern void __coverity_alloc_nosize__(void); +extern void *__coverity_alloc_nosize__(void); +extern void __coverity_writeall0__(void *); extern void *__coverity_alloc__(int); extern void __coverity_sleep__(); extern void __coverity_tainted_data_sanitize__(void *); +extern void __coverity_free__(void *); #endif void * OBJ_dup(void *o) { - __coverity_alloc_nosize__(); + return __coverity_alloc_nosize__(); } int @@ -133,4 +135,21 @@ AllocatePages(EFI_ALLOCATE_TYPE Type, return EFI_OUT_OF_RESOURCES; } +void * +AllocateZeroPool(int sz) +{ + void *ptr; + + __coverity_negative_sink__(sz); + ptr = __coverity_alloc__(sz); + __coverity_writeall0__(ptr); + return ptr; +} + +void +FreePool(void *ptr) +{ + __coverity_free__(ptr); +} + // vim:fenc=utf-8:tw=75 |