Quoting "Timur Birsh" <[email protected]>:
Hi George,
Thanks for your review.
George Danchev wrote:
[./source/notify.c:112]: (error) Resource leak: mail_pipe
In source/notify.c on lines 78-79:
if (!nomail)
mail_pipe = popen (buffer, "w");
and (lines 108-109):
if (!nomail)
pclose (mail_pipe);
It seems that resource properly released?
You are correct, I overlooked that somehow (I also saw that the file
handle (mail_pipe) is checked against NULL, well before the close).
OTOH, cppcheck was fooled by the scope of (global) var `nomail' (were
it local to the function, such false positive does not occur). I
prepared a little test case and reported it as well.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]