Changeset 1039 for trunk/dll/grep.c


Ignore:
Timestamp:
Jul 6, 2008, 12:16:21 AM (17 years ago)
Author:
Gregg Young
Message:

Removed unnecessary xfrees and included fortify.h where needed; moved several misplaced (x)frees;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/grep.c

    r1038 r1039  
    616616            else if (!InsertDupe(grep, szFindPath, pffbFile)) {
    617617              DosFindClose(findHandle);
    618               xfree(pffbArray, pszSrcFile, __LINE__);
     618              free(pffbArray);
    619619# ifdef FORTIFY
    620620  Fortify_LeaveScope();
     
    645645  }
    646646
    647   xfree(pffbArray, pszSrcFile, __LINE__);
     647  free(pffbArray);
    648648# ifdef FORTIFY
    649649  Fortify_LeaveScope();
     
    661661        free(grep->insertffb[x]);
    662662      }
    663       xfree(grep->insertffb, pszSrcFile, __LINE__);
     663      free(grep->insertffb);
    664664    }
    665665    if (grep->dir) {
     
    667667        free(grep->dir[x]);
    668668      }
    669       xfree(grep->dir, pszSrcFile, __LINE__);
     669      free(grep->dir);
    670670    }
    671671    grep->dir = NULL;
     
    782782                             pszSrcFile, __LINE__);
    783783        if (!grep->dir) {
    784           xfree(grep->insertffb, pszSrcFile, __LINE__);
     784          free(grep->insertffb);
    785785# ifdef FORTIFY
    786786  Fortify_LeaveScope();
     
    798798      grep->dir[grep->toinsert] = xstrdup(szDirectory, pszSrcFile, __LINE__);
    799799      if (!grep->dir) {
    800         xfree(grep->insertffb[grep->toinsert], pszSrcFile, __LINE__);
     800        free(grep->insertffb[grep->toinsert]);
    801801# ifdef FORTIFY
    802802  Fortify_LeaveScope();
     
    10181018        fclose(inputFile);
    10191019      }
    1020       xfree(input, pszSrcFile, __LINE__);
     1020      free(input);
    10211021# ifdef FORTIFY
    10221022  Fortify_LeaveScope();
     
    11351135      // DosSleep(1);                   // 07 Feb 08 SHL
    11361136    }
    1137     xfree(buffer, pszSrcFile, __LINE__);
     1137    free(buffer);
    11381138# ifdef FORTIFY
    11391139  Fortify_LeaveScope();
     
    16281628    info->name = xstrdup(dir, pszSrcFile, __LINE__);
    16291629    if (!info->name) {
    1630       xfree(info, pszSrcFile, __LINE__);
     1630      free(info);
    16311631# ifdef FORTIFY
    16321632  Fortify_LeaveScope();
Note: See TracChangeset for help on using the changeset viewer.