summaryrefslogtreecommitdiff
path: root/tools/coverity.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/coverity.c')
-rw-r--r--tools/coverity.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/coverity.c b/tools/coverity.c
index 3cc248c546..19a132a976 100644
--- a/tools/coverity.c
+++ b/tools/coverity.c
@@ -58,7 +58,22 @@ void *av_mallocz(size_t size) {
}
}
+void *av_realloc(void *ptr, size_t size) {
+ int has_memory;
+ __coverity_negative_sink__(size);
+ if (has_memory) {
+ __coverity_escape__(ptr);
+ ptr = __coverity_alloc__(size);
+ __coverity_writeall__(ptr);
+ __coverity_mark_as_afm_allocated__(ptr, "av_free");
+ return ptr;
+ } else {
+ return 0;
+ }
+}
+
void *av_free(void *ptr) {
__coverity_free__(ptr);
__coverity_mark_as_afm_freed__(ptr, "av_free");
}
+