[Openais] [PATCH 4/8] COVERITY 14: free zcb_mapped if memory_map() fails.
Angus Salkeld
angus.salkeld at gmail.com
Sat Oct 24 15:57:44 PDT 2009
At conditional (2): "res == 4294967295" taking true path
415 if (res == -1) {
Event leaked_storage: Returned without freeing storage "zcb_mapped"
Also see events: [alloc_fn][var_assign]
416 return (-1);
417 }
Signed-off-by: Angus Salkeld <angus.salkeld at gmail.com>
---
exec/coroipcs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/exec/coroipcs.c b/exec/coroipcs.c
index 21042a7..065a355 100644
--- a/exec/coroipcs.c
+++ b/exec/coroipcs.c
@@ -413,6 +413,7 @@ static inline int zcb_alloc (
size,
addr);
if (res == -1) {
+ free (zcb_mapped);
return (-1);
}
--
1.6.2.5
More information about the Openais
mailing list