Changeset 1029 for trunk/dll/grep.c


Ignore:
Timestamp:
Jun 23, 2008, 3:30:16 AM (17 years ago)
Author:
Gregg Young
Message:

Fixed early memory free; Added free_... functions to make fortify checking easier; Added fortify scopes; Delete now moves to trash can on systems with the xworkplace trash can installed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/grep.c

    r1017 r1029  
    288288      WinCancelShutdown(ghmq, TRUE);
    289289      IncrThreadUsage();
     290# ifdef FORTIFY
     291  Fortify_EnterScope();
     292# endif
    290293      // DosSleep(100); //05 Aug 07 GKY 128     // 07 Feb 08 SHL
    291294      // hwndStatus does not exist for applet
     
    411414    free(grep.matched);
    412415  // 07 Feb 08 SHL fixme to free grep here when not static
     416# ifdef FORTIFY
     417  Fortify_LeaveScope();
     418# endif
    413419  DosPostEventSem(CompactSem);
    414420}
     
    610616              DosFindClose(findHandle);
    611617              xfree(pffbArray, pszSrcFile, __LINE__);
     618# ifdef FORTIFY
     619  Fortify_LeaveScope();
     620# endif
    612621              return 1;
    613622            }
     
    636645
    637646  xfree(pffbArray, pszSrcFile, __LINE__);
     647# ifdef FORTIFY
     648  Fortify_LeaveScope();
     649# endif
    638650  return 0;
    639651}
     
    658670    grep->toinsert = 0L;
    659671    grep->insertedbytes = 0L;
     672# ifdef FORTIFY
     673  Fortify_LeaveScope();
     674# endif
    660675  }
    661676}
     
    765780        if (!grep->dir) {
    766781          xfree(grep->insertffb, pszSrcFile, __LINE__);
     782# ifdef FORTIFY
     783  Fortify_LeaveScope();
     784# endif
    767785          return FALSE;
    768786        }
     
    777795      grep->dir[grep->toinsert] = xstrdup(szDirectory, pszSrcFile, __LINE__);
    778796      if (!grep->dir) {
    779         xfree(grep->insertffb[grep->toinsert], pszSrcFile, __LINE__);
     797        xfree(grep->insertffb[grep->toinsert], pszSrcFile, __LINE__);
     798# ifdef FORTIFY
     799  Fortify_LeaveScope();
     800# endif
    780801        return FALSE;
    781802      }
     
    9951016      }
    9961017      xfree(input, pszSrcFile, __LINE__);
     1018# ifdef FORTIFY
     1019  Fortify_LeaveScope();
     1020# endif
    9971021      // DosSleep(1);                   // 07 Feb 08 SHL
    9981022    }
     
    11091133    }
    11101134    xfree(buffer, pszSrcFile, __LINE__);
     1135# ifdef FORTIFY
     1136  Fortify_LeaveScope();
     1137# endif
    11111138  }
    11121139  return CRC;
     
    11291156  xfree(grep->dupesizes, pszSrcFile, __LINE__);
    11301157  grep->dupesizes = grep->dupenames = NULL;
     1158# ifdef FORTIFY
     1159  Fortify_LeaveScope();
     1160# endif
    11311161}
    11321162
     
    14781508      xfree(grep->dupesizes, pszSrcFile, __LINE__);
    14791509      grep->dupesizes = NULL;
     1510# ifdef FORTIFY
     1511  Fortify_LeaveScope();
     1512# endif
    14801513
    14811514      InitITimer(pitdSleep, 0);         // Reset rate estimator
     
    15921625    if (!info->name) {
    15931626      xfree(info, pszSrcFile, __LINE__);
     1627# ifdef FORTIFY
     1628  Fortify_LeaveScope();
     1629# endif
    15941630      return FALSE;
    15951631    }
Note: See TracChangeset for help on using the changeset viewer.