bug-gv
[Top][All Lists]
Advanced

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

[bug-gv] gv-3.7.2: Possible pointless call to unlink ?


From: David Binderman
Subject: [bug-gv] gv-3.7.2: Possible pointless call to unlink ?
Date: Sat, 11 Jun 2011 07:02:46 +0000


Hello there,

I just ran the static analysis tool cppcheck over the
source code of gv-3.7.2. It said

[gv-3.7.2/src/ps.c:612]: (error) Dereferencing 'tmp_file' after it is deallocated / released

The source code is

    fclose(tmp_file);
    unlink((char*) tmp_file);

Since the file is only read, I can't see any point in unlinking it.
Suggest new code

    fclose(tmp_file);

Regards

David Binderman


reply via email to

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