Changeset 1039 for trunk/dll/arccnrs.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/arccnrs.c

    r1038 r1039  
    14421442        if (!dcd->info->extract) {
    14431443          Runtime_Error(pszSrcFile, __LINE__, "no extract");
    1444           xfree(s, pszSrcFile, __LINE__);
     1444          free(s);
    14451445          return 0;
    14461446        }
     
    14721472        }
    14731473        // printf("%s %d UM_ENTER %s %s\n",__FILE__, __LINE__,filename, s); fflush(stdout);     // 10 Mar 07 SHL hang
    1474         xfree(s, pszSrcFile, __LINE__);
     1474        free(s);
    14751475        if (IsFile(filename) == 1) {
    14761476#if 1 // 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing
     
    17501750                  strcat(p, temp);
    17511751                  li->list[x] = p;
    1752                   xfree(temp, pszSrcFile, __LINE__);
     1752                  free(temp);
    17531753                }
    17541754              }
     
    19971997      FreeList(dcd->lastselection);
    19981998      WinSendMsg(dcd->hwndCnr, UM_CLOSE, MPVOID, MPVOID);
    1999       xfree(dcd, pszSrcFile, __LINE__);
     1999      free(dcd);
    20002000# ifdef FORTIFY
    20012001  Fortify_LeaveScope();
     
    25512551        hwnd = StartMLEEditor(dcd->hwndParent,
    25522552                              (INT)mp1, (CHAR *)mp2, dcd->hwndFrame);
    2553       xfree((CHAR *)mp2, pszSrcFile, __LINE__);
     2553      free((CHAR *)mp2);
    25542554      return MRFROMLONG(hwnd);
    25552555    }
     
    29202920                BldFullPathName(s, dcd->workdir, li->list[x]);
    29212921                if (IsFile(s) != 1) {
    2922                   xfree(li->list[x], pszSrcFile, __LINE__);
     2922                  free(li->list[x]);
    29232923                  li->list[x] = NULL;
    29242924                  for (y = x; li->list[y]; y++)
     
    29322932                  p = xstrdup(s, pszSrcFile, __LINE__);
    29332933                  if (p) {
    2934                     xfree(li->list[x], pszSrcFile, __LINE__);
     2934                    free(li->list[x]);
    29352935                    li->list[x] = p;
    29362936                  }
     
    29802980            }
    29812981            else
    2982               xfree(li, pszSrcFile, __LINE__);
     2982              free(li);
    29832983# ifdef FORTIFY
    29842984  Fortify_LeaveScope();
     
    32443244              if (!PostMsg(dcd->hwndObject, UM_ENTER, MPFROMP(s), MPVOID)) {
    32453245                Runtime_Error(pszSrcFile, __LINE__, "post");
    3246                 xfree(s, pszSrcFile, __LINE__);
     3246                free(s);
    32473247              }
    32483248            }
     
    35403540                     IDS_WINCREATEWINDOW);
    35413541          PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID);
    3542           xfree(dcd, pszSrcFile, __LINE__);
     3542          free(dcd);
    35433543# ifdef FORTIFY
    35443544  Fortify_LeaveScope();
Note: See TracChangeset for help on using the changeset viewer.