FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default qdiskd: don't leak memory if we fail to read from disk

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 d0d05f0... 7c6e114... M cman/qdisk/disk.c
cman/qdisk/disk.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cman/qdisk/disk.c b/cman/qdisk/disk.c
index d0d05f0..7c6e114 100644
--- a/cman/qdisk/disk.c
+++ b/cman/qdisk/disk.c
@@ -604,6 +604,7 @@ qdisk_read(target_info_t *disk, __off64_t offset, void *bufin, int count)
rv = diskRawReadShadow(disk, offset, (char *)hdrp, disk->d_blksz);

if (rv == -1) {
+ free(hdrp);
return -1;
}

--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 09:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org