]> granicus.if.org Git - procps-ng/commitdiff
0096-top: Fix double-fclose() in configs_read().
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Sat, 9 Jun 2018 11:35:19 +0000 (21:35 +1000)
It happens only if RCFILE_NOERR is defined (it is not, by default).

top/top.c

index bb2789c93372ab2732457481dd71680f2034273d..71000fe64f17fbf3c00e8c79979b1378ae847761 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -3420,7 +3420,6 @@ default_or_error:
 #ifdef RCFILE_NOERR
 {  RCF_t rcdef = DEF_RCFILE;
    int i;
-   fclose(fp);
    Rc = rcdef;
    for (i = 0 ; i < GROUPSMAX; i++)
       Winstk[i].rc  = Rc.win[i];