bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] Resource link in rl-fgets.c example file.


From: William Egert
Subject: [Bug-readline] Resource link in rl-fgets.c example file.
Date: Sat, 21 Mar 2009 10:58:05 -0400

Hi,

Using cppcheck 1.30 against readline 6.0 yields:

[./examples/rl-fgets.c:245]: (error) Resource leak: fp

it looks like you should be doing a close on fp before you return in the error condition.


Also cppcheck noted:
[./util.c:436]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./xmalloc.c:87]: (style) Redundant condition. It is safe to deallocate a NULL pointer

These aren't really bugs but just thought I would mention it.

Thanks for your time,
-Bill



reply via email to

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