Menu

#7 arcmisc.c:131]: (error) Resource leak: old

v1.0 (example)
open
nobody
None
5
2018-02-19
2018-02-19
dcb
No

Source code is

    old = fopen(oldnam, OPEN_R);
    if (old == NULL)
        return (-1);
    new = fopen(newnam, OPEN_W);
    if (new == NULL)
        return (-1);

Suggest add missing call to fclose( old) in final if.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB