gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] Possible errors in your source code


From: Patrick Matthäi
Subject: [Gluster-devel] Possible errors in your source code
Date: Sat, 13 Nov 2010 18:30:12 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101110 Iceowl/1.0b2 Icedove/3.1.6

Hello,

I have done an automatig source code check with cppcheck 1.44 for your
source code and get the following result:

[./glusterfs-3.0.6/booster/src/booster_fstab.c:427]: (error) Memory
leak: timeostr
[./glusterfs-3.0.6/libglusterfs/src/dict.c:179]: (error) Memory leak:
newdata
[./glusterfs-3.0.6/libglusterfs/src/fd.c:464]: (error) Possible null
pointer dereference: fd - otherwise it is redundant to check if fd is
null at line 466
[./glusterfs-3.0.6/libglusterfs/src/spec.lex.c:562]: (error) Common
realloc mistake: "text" nulled but not freed upon failure
[./glusterfs-3.0.6/libglusterfs/src/statedump.c:185]: (error) Resource
leak: fp
[./glusterfs-3.0.6/libglusterfs/src/y.tab.c:2096]: (error) Common
realloc mistake: "cmd" nulled but not freed upon failure
[./glusterfs-3.0.6/libglusterfs/src/y.tab.c:2101]: (error) Common
realloc mistake: "result" nulled but not freed upon failure
[./glusterfs-3.0.6/libglusterfs/src/y.tab.c:1743]: (error) Memory leak: node
[./glusterfs-3.0.6/libglusterfs/src/y.tab.c:2067]: (error) Memory leak: cmd
[./glusterfs-3.0.6/xlators/protocol/client/src/client-protocol.c:3495]:
(error) Possible null pointer dereference: iobuf - otherwise it is
redundant to check if iobuf is null at line 3566
[./glusterfs-3.0.6/xlators/protocol/server/src/server-protocol.c:324]:
(error) Possible null pointer dereference: state - otherwise it is
redundant to check if state is null at line 344
[./glusterfs-3.0.6/xlators/protocol/server/src/server-protocol.c:5927]:
(error) Possible null pointer dereference: xl
[./glusterfs-3.0.6/xlators/protocol/server/src/server-protocol.c:5941]:
(error) Possible null pointer dereference: xl
[./glusterfs-3.0.6/xlators/storage/posix/src/posix.c:1072]: (error)
Common realloc mistake: "entry_path" nulled but not freed upon failure


Please note, that I did not verify, if the errors are a false positive,
or not. Please check it, thanks!

-- 
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

E-Mail: address@hidden
        address@hidden

Comment:
Always if we think we are right,
we were maybe wrong.
*/

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]