Changeset 1039
- Timestamp:
- Jul 6, 2008, 12:16:21 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 52 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r1038 r1039 1442 1442 if (!dcd->info->extract) { 1443 1443 Runtime_Error(pszSrcFile, __LINE__, "no extract"); 1444 xfree(s, pszSrcFile, __LINE__);1444 free(s); 1445 1445 return 0; 1446 1446 } … … 1472 1472 } 1473 1473 // 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); 1475 1475 if (IsFile(filename) == 1) { 1476 1476 #if 1 // 06 Oct 07 SHL fixme to be gone - set to 0 for ticket #58 testing … … 1750 1750 strcat(p, temp); 1751 1751 li->list[x] = p; 1752 xfree(temp, pszSrcFile, __LINE__);1752 free(temp); 1753 1753 } 1754 1754 } … … 1997 1997 FreeList(dcd->lastselection); 1998 1998 WinSendMsg(dcd->hwndCnr, UM_CLOSE, MPVOID, MPVOID); 1999 xfree(dcd, pszSrcFile, __LINE__);1999 free(dcd); 2000 2000 # ifdef FORTIFY 2001 2001 Fortify_LeaveScope(); … … 2551 2551 hwnd = StartMLEEditor(dcd->hwndParent, 2552 2552 (INT)mp1, (CHAR *)mp2, dcd->hwndFrame); 2553 xfree((CHAR *)mp2, pszSrcFile, __LINE__);2553 free((CHAR *)mp2); 2554 2554 return MRFROMLONG(hwnd); 2555 2555 } … … 2920 2920 BldFullPathName(s, dcd->workdir, li->list[x]); 2921 2921 if (IsFile(s) != 1) { 2922 xfree(li->list[x], pszSrcFile, __LINE__);2922 free(li->list[x]); 2923 2923 li->list[x] = NULL; 2924 2924 for (y = x; li->list[y]; y++) … … 2932 2932 p = xstrdup(s, pszSrcFile, __LINE__); 2933 2933 if (p) { 2934 xfree(li->list[x], pszSrcFile, __LINE__);2934 free(li->list[x]); 2935 2935 li->list[x] = p; 2936 2936 } … … 2980 2980 } 2981 2981 else 2982 xfree(li, pszSrcFile, __LINE__);2982 free(li); 2983 2983 # ifdef FORTIFY 2984 2984 Fortify_LeaveScope(); … … 3244 3244 if (!PostMsg(dcd->hwndObject, UM_ENTER, MPFROMP(s), MPVOID)) { 3245 3245 Runtime_Error(pszSrcFile, __LINE__, "post"); 3246 xfree(s, pszSrcFile, __LINE__);3246 free(s); 3247 3247 } 3248 3248 } … … 3540 3540 IDS_WINCREATEWINDOW); 3541 3541 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3542 xfree(dcd, pszSrcFile, __LINE__);3542 free(dcd); 3543 3543 # ifdef FORTIFY 3544 3544 Fortify_LeaveScope(); -
trunk/dll/assoc.c
r1029 r1039 37 37 #include "strutil.h" // GetPString 38 38 #include "fm3dll.h" 39 #include "fortify.h" 39 40 40 41 #pragma data_seg(DATA1) … … 122 123 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 123 124 xfree(info->sig, pszSrcFile, __LINE__); 124 xfree(info, pszSrcFile, __LINE__);125 free(info); 125 126 info = next; 126 127 } … … 185 186 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 186 187 xfree(info->mask, pszSrcFile, __LINE__); 187 xfree(info, pszSrcFile, __LINE__);188 free(info); 188 189 break; 189 190 } … … 234 235 MPFROMSHORT(x), MPFROMSHORT(TRUE)); 235 236 } 236 xfree(pszDisplayStr, pszSrcFile, __LINE__);237 free(pszDisplayStr); 237 238 } 238 239 } … … 316 317 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 317 318 xfree(info->mask, pszSrcFile, __LINE__); 318 xfree(info, pszSrcFile, __LINE__);319 free(info); 319 320 } 320 321 else { … … 363 364 xfree(info->mask, pszSrcFile, __LINE__); 364 365 xfree(info->sig, pszSrcFile, __LINE__); 365 xfree(info, pszSrcFile, __LINE__);366 free(info); 366 367 return TRUE; 367 368 } … … 696 697 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 697 698 if (!pszWorkBuf) { 698 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);699 free(temp.pszCmdLine); 699 700 break; //already complained 700 701 } … … 705 706 memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1); 706 707 } 707 xfree(pszWorkBuf, pszSrcFile, __LINE__);708 free(pszWorkBuf); 708 709 WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig); 709 710 rstrip(temp.sig); … … 732 733 if (fCancelAction){ 733 734 fCancelAction = FALSE; 734 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);735 free(temp.pszCmdLine); 735 736 break; 736 737 } … … 743 744 save_associations(); 744 745 } 745 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);746 free(temp.pszCmdLine); 746 747 } 747 748 WinDismissDlg(hwnd, 1); … … 771 772 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 772 773 if (!pszWorkBuf) { 773 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);774 free(temp.pszCmdLine); 774 775 break; //already complained 775 776 } … … 780 781 memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1); 781 782 } 782 xfree(pszWorkBuf, pszSrcFile, __LINE__);783 free(pszWorkBuf); 783 784 WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig); 784 785 rstrip(temp.sig); … … 807 808 if (fCancelAction){ 808 809 fCancelAction = FALSE; 809 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);810 free(temp.pszCmdLine); 810 811 break; 811 812 } … … 817 818 save_associations(); 818 819 } 819 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);820 free(temp.pszCmdLine); 820 821 } 821 822 break; … … 853 854 save_associations(); 854 855 } 855 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);856 free(temp.pszCmdLine); 856 857 } 857 858 … … 875 876 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 876 877 if (!pszWorkBuf) { 877 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);878 free(temp.pszCmdLine); 878 879 break; //already complained 879 880 } … … 884 885 memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1); 885 886 } 886 xfree(pszWorkBuf, pszSrcFile, __LINE__);887 free(pszWorkBuf); 887 888 WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig); 888 889 rstrip(temp.sig); … … 911 912 if (fCancelAction){ 912 913 fCancelAction = FALSE; 913 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);914 free(temp.pszCmdLine); 914 915 break; 915 916 } … … 920 921 save_associations(); 921 922 } 922 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);923 free(temp.pszCmdLine); 923 924 } 924 925 { … … 957 958 save_associations(); 958 959 } 959 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);960 free(temp.pszCmdLine); 960 961 } 961 962 break; -
trunk/dll/autoview.c
r1038 r1039 415 415 WinSetWindowText(hwndAutoview, obuff); 416 416 } 417 xfree(obuff, pszSrcFile, __LINE__);417 free(obuff); 418 418 } 419 xfree(ibuff, pszSrcFile, __LINE__);419 free(ibuff); 420 420 } 421 421 DosClose(handle); … … 510 510 if (*pszBuf) 511 511 WinSetWindowText(hwndAutoview, pszBuf); 512 xfree(pszBuf, pszSrcFile, __LINE__);512 free(pszBuf); 513 513 } 514 514 } … … 544 544 rc = DosQueryPathInfo((CHAR *)mp1, FIL_QUERYEASFROMLIST, 545 545 (PVOID) & eaop, (ULONG) sizeof(EAOP2)); 546 xfree(pgealist, pszSrcFile, __LINE__);546 free(pgealist); 547 547 if (!rc) { 548 548 pfea = &eaop.fpFEA2List->list[0]; … … 594 594 } 595 595 WinSetWindowText(hwndAutoMLE, pszBuf); 596 xfree(pszBuf, pszSrcFile, __LINE__);596 free(pszBuf); 597 597 } 598 598 } … … 608 608 MLEsetreadonly(hwndAutoMLE, FALSE); 609 609 } 610 xfree(pfealist, pszSrcFile, __LINE__);610 free(pfealist); 611 611 } 612 612 } 613 613 } 614 614 } 615 xfree((CHAR *)mp1, pszSrcFile, __LINE__);615 free((CHAR *)mp1); 616 616 # ifdef FORTIFY 617 617 Fortify_LeaveScope(); … … 798 798 PutComments(hwnd, currfile, ea); 799 799 PostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(IDM_RESCAN, 0), MPVOID); 800 xfree(ea, pszSrcFile, __LINE__);800 free(ea); 801 801 # ifdef FORTIFY 802 802 Fortify_LeaveScope(); … … 851 851 stopflag++; 852 852 if (!PostMsg(hwndAutoObj, UM_LOADFILE, MPFROMP(cf), MPVOID)) 853 xfree(cf, pszSrcFile, __LINE__);853 free(cf); 854 854 # ifdef FORTIFY 855 855 Fortify_LeaveScope(); -
trunk/dll/avl.c
r1029 r1039 51 51 #include "errutil.h" // Runtime_Error 52 52 #include "fm3dll.h" 53 #include "fortify.h" 53 54 54 55 static PSZ pszSrcFile = __FILE__; … … 265 266 xfree(pat->createwdirs, pszSrcFile, __LINE__); 266 267 xfree(pat->movewdirs, pszSrcFile, __LINE__); 267 xfree(pat, pszSrcFile, __LINE__);268 free(pat); 268 269 } 269 270 } … … 851 852 ArcReviewDlgProc, 852 853 FM3ModHandle, AD_FRAME, MPFROMP(&ad))) { 853 xfree(ad.info, pszSrcFile, __LINE__);854 free(ad.info); 854 855 } 855 856 else { -
trunk/dll/avv.c
r1009 r1039 42 42 #include "fm3dll.h" 43 43 #include "pathutil.h" // NormalizeCmdLine 44 #include "fortify.h" 44 45 45 46 #pragma data_seg(DATA1) … … 105 106 NormalizeCmdLine(pszWorkBuf, szCmdLine); 106 107 pszDest = xstrdup(pszWorkBuf, pszSrcFile, __LINE__); 107 xfree(pszWorkBuf, pszSrcFile, __LINE__);108 free(pszWorkBuf); 108 109 } 109 110 else 110 111 pszDest = xstrdup(szCmdLine, pszSrcFile, __LINE__); // return the unexamined input on failure 111 xfree(szCmdLine, pszSrcFile, __LINE__);112 free(szCmdLine); 112 113 } 113 114 else -
trunk/dll/cmdline.c
r1009 r1039 37 37 #include "fm3dll.h" 38 38 #include "pathutil.h" // MaxCmdLineStr 39 #include "fortify.h" 39 40 40 41 static PSZ pszSrcFile = __FILE__; … … 88 89 info->cmdline = xstrdup(pszCmdLine, pszSrcFile, __LINE__); 89 90 if (!info->cmdline) 90 xfree(info, pszSrcFile, __LINE__);91 free(info); 91 92 else { 92 93 info->next = NULL; … … 102 103 fclose(fp); 103 104 } 105 free(pszCmdLine); 104 106 } 105 xfree(pszCmdLine, pszSrcFile, __LINE__);106 107 if (DoItYourself) 107 108 DoItYourselfCmdLine = CmdLineHead; … … 185 186 info = CmdLineHead; 186 187 CmdLineHead = CmdLineHead->next; 187 xfree(info, pszSrcFile, __LINE__);188 free(info); 188 189 } 189 190 if (DoItYourself) … … 214 215 CmdLineHead = info->next; 215 216 xfree(info->cmdline, pszSrcFile, __LINE__); 216 xfree(info, pszSrcFile, __LINE__);217 free(info); 217 218 if (DoItYourself) 218 219 DoItYourselfCmdLine = CmdLineHead; … … 236 237 next = info->next; 237 238 xfree(info->cmdline, pszSrcFile, __LINE__); 238 xfree(info, pszSrcFile, __LINE__);239 free(info); 239 240 info = next; 240 241 } -
trunk/dll/collect.c
r1037 r1039 907 907 Runtime_Error(pszSrcFile, __LINE__, 908 908 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 909 xfree(wk, pszSrcFile, __LINE__);909 free(wk); 910 910 # ifdef FORTIFY 911 911 Fortify_LeaveScope(); … … 940 940 Runtime_Error(pszSrcFile, __LINE__, 941 941 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 942 xfree(wk, pszSrcFile, __LINE__);942 free(wk); 943 943 # ifdef FORTIFY 944 944 Fortify_LeaveScope(); … … 968 968 WinSendMsg(dcd->hwndCnr, UM_CLOSE, MPVOID, MPVOID); 969 969 FreeList(dcd->lastselection); 970 xfree(dcd, pszSrcFile, __LINE__);970 free(dcd); 971 971 # ifdef FORTIFY 972 972 Fortify_LeaveScope(); … … 1467 1467 if (mp1) { 1468 1468 if (!dcd) { 1469 xfree(mp1, pszSrcFile, __LINE__);1469 free(mp1); 1470 1470 # ifdef FORTIFY 1471 1471 Fortify_LeaveScope(); … … 1476 1476 if (!PostMsg(dcd->hwndObject, UM_COLLECTFROMFILE, mp1, mp2)) { 1477 1477 Runtime_Error(pszSrcFile, __LINE__, "PostMsg"); 1478 xfree(mp1, pszSrcFile, __LINE__);1478 free(mp1); 1479 1479 # ifdef FORTIFY 1480 1480 Fortify_LeaveScope(); … … 1605 1605 if (p) { 1606 1606 if (!PostMsg(hwnd, UM_COLLECTFROMFILE, MPFROMP(p), MPVOID)) 1607 xfree(p, pszSrcFile, __LINE__);1607 free(p); 1608 1608 # ifdef FORTIFY 1609 1609 Fortify_LeaveScope(); … … 2124 2124 } 2125 2125 else 2126 xfree(li, pszSrcFile, __LINE__);2126 free(li); 2127 2127 # ifdef FORTIFY 2128 2128 Fortify_LeaveScope(); … … 2691 2691 hwnd = StartMLEEditor(dcd->hwndParent, 2692 2692 (INT)mp1, (CHAR *)mp2, dcd->hwndFrame); 2693 xfree((CHAR *)mp2, pszSrcFile, __LINE__);2693 free((CHAR *)mp2); 2694 2694 return MRFROMLONG(hwnd); 2695 2695 } … … 2884 2884 IDS_WINCREATEWINDOW); 2885 2885 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 2886 xfree(dcd, pszSrcFile, __LINE__);2886 free(dcd); 2887 2887 # ifdef FORTIFY 2888 2888 Fortify_LeaveScope(); -
trunk/dll/command.c
r1009 r1039 44 44 #include "pathutil.h" // NormalizeCmdLine 45 45 #include "command.h" 46 #include "fortify.h" 46 47 47 48 typedef struct … … 310 311 xfree(info->title, pszSrcFile, __LINE__); 311 312 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 312 xfree(info, pszSrcFile, __LINE__);313 free(info); 313 314 info = next; 314 315 } … … 360 361 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 361 362 xfree(info->title, pszSrcFile, __LINE__); 362 xfree(info, pszSrcFile, __LINE__);363 free(info); 363 364 break; 364 365 } … … 372 373 } 373 374 } 374 xfree(pszCmdLine, pszSrcFile, __LINE__);375 free(pszCmdLine); 375 376 fclose(fp); 376 377 } … … 429 430 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 430 431 xfree(info->title, pszSrcFile, __LINE__); 431 xfree(info, pszSrcFile, __LINE__);432 free(info); 432 433 return NULL; 433 434 } … … 466 467 xfree(info->pszCmdLine, pszSrcFile, __LINE__); 467 468 xfree(info->title, pszSrcFile, __LINE__); 468 xfree(info, pszSrcFile, __LINE__);469 free(info); 469 470 return TRUE; 470 471 } … … 635 636 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 636 637 if (!pszWorkBuf) { 637 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);638 free(temp.pszCmdLine); 638 639 break; //already complained 639 640 } … … 641 642 NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine); 642 643 memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1); 643 xfree(pszWorkBuf, pszSrcFile, __LINE__);644 free(pszWorkBuf); 644 645 if (!strchr(temp.pszCmdLine, '%')){ 645 646 ret = saymsg(MB_YESNO, … … 669 670 if (fCancelAction){ 670 671 fCancelAction = FALSE; 671 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);672 free(temp.pszCmdLine); 672 673 break; 673 674 } … … 708 709 } 709 710 } 710 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);711 free(temp.pszCmdLine); 711 712 } 712 713 x = (SHORT) WinSendDlgItemMsg(hwnd, … … 740 741 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 741 742 if (!pszWorkBuf) { 742 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);743 free(temp.pszCmdLine); 743 744 break; //already complained 744 745 } … … 746 747 NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine); 747 748 memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1); 748 xfree(pszWorkBuf, pszSrcFile, __LINE__);749 free(pszWorkBuf); 749 750 if (!strchr(temp.pszCmdLine, '%')){ 750 751 ret = saymsg(MB_YESNO, … … 774 775 if (fCancelAction){ 775 776 fCancelAction = FALSE; 776 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);777 free(temp.pszCmdLine); 777 778 break; 778 779 } … … 809 810 } 810 811 } 811 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);812 free(temp.pszCmdLine); 812 813 } 813 814 break; … … 853 854 temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__); 854 855 if (!temp.pszCmdLine) { 855 xfree(pszWorkBuf, pszSrcFile, __LINE__);856 free(pszWorkBuf); 856 857 break; //already complained 857 858 } … … 859 860 NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine); 860 861 memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1); 861 xfree(pszWorkBuf, pszSrcFile, __LINE__);862 free(pszWorkBuf); 862 863 if (fCancelAction){ 863 864 fCancelAction = FALSE; 864 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);865 free(temp.pszCmdLine); 865 866 break; 866 867 } … … 976 977 } 977 978 } 978 xfree(temp.pszCmdLine, pszSrcFile, __LINE__);979 free(temp.pszCmdLine); 979 980 } 980 981 break; -
trunk/dll/common.c
r1009 r1039 41 41 #include "strutil.h" // GetPString 42 42 #include "fm3dll.h" 43 #include "fortify.h" 43 44 44 45 #pragma data_seg(DATA1) … … 746 747 Broadcast(WinQueryAnchorBlock(hwnd), 747 748 dcd->hwndParent, UM_UPDATERECORD, mp2, MPVOID); 748 xfree(mp2, pszSrcFile, __LINE__);749 free(mp2); 749 750 } 750 751 } -
trunk/dll/comp.c
r1038 r1039 146 146 DosFindClose(hdir); 147 147 } 148 xfree(mask, pszSrcFile, __LINE__);148 free(mask); 149 149 } 150 xfree(pffb, pszSrcFile, __LINE__);150 free(pffb); 151 151 } 152 152 } … … 180 180 } 181 181 } 182 xfree(sf, pszSrcFile, __LINE__);182 free(sf); 183 183 } 184 184 } … … 691 691 // PostMsg(cmp->hwnd, WM_COMMAND, MPFROM2SHORT(IDM_DESELECTALL, 0), MPVOID); // 18 Jan 08 SHL we can count now 692 692 DecrThreadUsage(); 693 xfree(cmp, pszSrcFile, __LINE__);693 free(cmp); 694 694 WinTerminate(hab); 695 695 # ifdef FORTIFY … … 756 756 } 757 757 DecrThreadUsage(); 758 xfree(cmp, pszSrcFile, __LINE__);758 free(cmp); 759 759 WinTerminate(hab); 760 760 # ifdef FORTIFY … … 763 763 } 764 764 else 765 xfree(cmp, pszSrcFile, __LINE__);765 free(cmp); 766 766 } 767 767 … … 808 808 pciSa = xmalloc(sizeof(PCNRITEM) * numS, pszSrcFile, __LINE__); 809 809 if (!pciSa) { 810 xfree(pciDa, pszSrcFile, __LINE__);810 free(pciDa); 811 811 return; 812 812 } … … 841 841 goto Restart; 842 842 } 843 xfree(pciDa, pszSrcFile, __LINE__);844 xfree(pciSa, pszSrcFile, __LINE__);843 free(pciDa); 844 free(pciSa); 845 845 Runtime_Error(pszSrcFile, __LINE__, "numD %u != x %lu", numD, x); 846 846 return; … … 868 868 goto Restart; 869 869 } 870 xfree(pciSa, pszSrcFile, __LINE__);871 xfree(pciDa, pszSrcFile, __LINE__);870 free(pciSa); 871 free(pciDa); 872 872 Runtime_Error(pszSrcFile, __LINE__, "numS (%lu) != x (%lu)", numS, x); 873 873 return; … … 1312 1312 } 1313 1313 1314 xfree(pciSa, pszSrcFile, __LINE__);1315 xfree(pciDa, pszSrcFile, __LINE__);1314 free(pciSa); 1315 free(pciDa); 1316 1316 1317 1317 if (fUpdateHideButton) { … … 1354 1354 pffbArray = xmalloc(ulBufBytes, pszSrcFile, __LINE__); 1355 1355 if (!pffbArray) { 1356 xfree(maskstr, pszSrcFile, __LINE__);1356 free(maskstr); 1357 1357 return; 1358 1358 } … … 1402 1402 // Complain if pathnames exceeds max 1403 1403 DosFindClose(hDir); 1404 xfree(pffbArray, pszSrcFile, __LINE__);1405 xfree(maskstr, pszSrcFile, __LINE__);1404 free(pffbArray); 1405 free(maskstr); 1406 1406 if (!fDone) { 1407 1407 fDone = TRUE; … … 2097 2097 WinTerminate(hab); 2098 2098 } 2099 xfree(cmp, pszSrcFile, __LINE__);2099 free(cmp); 2100 2100 DosPostEventSem(CompactSem); 2101 2101 … … 2665 2665 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2666 2666 WinDismissDlg(hwnd, 0); 2667 xfree(forthread, pszSrcFile, __LINE__);2667 free(forthread); 2668 2668 # ifdef FORTIFY 2669 2669 Fortify_LeaveScope(); … … 2948 2948 Runtime_Error(pszSrcFile, __LINE__, 2949 2949 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2950 xfree(sf, pszSrcFile, __LINE__);2950 free(sf); 2951 2951 } 2952 2952 } … … 3000 3000 Runtime_Error(pszSrcFile, __LINE__, 3001 3001 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 3002 xfree(forthread, pszSrcFile, __LINE__);3002 free(forthread); 3003 3003 } 3004 3004 else { … … 3123 3123 Runtime_Error(pszSrcFile, __LINE__, 3124 3124 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 3125 xfree(forthread, pszSrcFile, __LINE__);3125 free(forthread); 3126 3126 } 3127 3127 else { … … 3279 3279 WinSendMsg(cmp->dcd.hwndObject, WM_CLOSE, MPVOID, MPVOID); 3280 3280 } 3281 xfree(cmp, pszSrcFile, __LINE__);3281 free(cmp); 3282 3282 } 3283 3283 EmptyCnr(hwndLeft); -
trunk/dll/copyf.c
r1009 r1039 36 36 #include "strutil.h" // GetPString 37 37 #include "fm3dll.h" 38 #include "fortify.h" 38 39 39 40 static PSZ pszSrcFile = __FILE__; … … 237 238 longname[CCHMAXPATH - 1] = 0; 238 239 } 239 xfree(pfealist, pszSrcFile, __LINE__);240 } 241 xfree(pgealist, pszSrcFile, __LINE__);240 free(pfealist); 241 } 242 free(pgealist); 242 243 } 243 244 } … … 712 713 /* under no circumstances! */ 713 714 Runtime_Error(pszSrcFile, __LINE__, "bad name %s", str); 714 xfree(str, pszSrcFile, __LINE__);715 free(str); 715 716 return -1; 716 717 } … … 739 740 xfree(ss, pszSrcFile, __LINE__); 740 741 xfree(f, pszSrcFile, __LINE__); 741 xfree(str, pszSrcFile, __LINE__);742 free(str); 742 743 return -1; 743 744 } … … 784 785 } 785 786 786 xfree(f, pszSrcFile, __LINE__);787 xfree(ss, pszSrcFile, __LINE__);788 xfree(str, pszSrcFile, __LINE__);787 free(f); 788 free(ss); 789 free(str); 789 790 return 0; 790 791 } … … 833 834 xfree(ss, pszSrcFile, __LINE__); 834 835 xfree(f, pszSrcFile, __LINE__); 835 xfree(str, pszSrcFile, __LINE__);836 free(str); 836 837 return -1; 837 838 } … … 857 858 } 858 859 859 xfree(f, pszSrcFile, __LINE__);860 xfree(ss, pszSrcFile, __LINE__);861 xfree(str, pszSrcFile, __LINE__);860 free(f); 861 free(ss); 862 free(str); 862 863 return 0; 863 864 } -
trunk/dll/dircnrs.c
r1038 r1039 1005 1005 Runtime_Error(pszSrcFile, __LINE__, 1006 1006 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 1007 xfree(wk, pszSrcFile, __LINE__);1007 free(wk); 1008 1008 FreeListInfo((LISTINFO *) mp1); 1009 1009 # ifdef FORTIFY … … 1040 1040 Runtime_Error(pszSrcFile, __LINE__, 1041 1041 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 1042 xfree(wk, pszSrcFile, __LINE__);1042 free(wk); 1043 1043 FreeListInfo((LISTINFO *) mp1); 1044 1044 # ifdef FORTIFY … … 2563 2563 } 2564 2564 else 2565 xfree(li, pszSrcFile, __LINE__);2565 free(li); 2566 2566 } 2567 2567 } … … 3356 3356 SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER); 3357 3357 FreeList(dcd->lastselection); 3358 xfree(dcd, pszSrcFile, __LINE__);3358 free(dcd); 3359 3359 WinSetWindowPtr(hwnd, QWL_USER, NULL); 3360 3360 DosPostEventSem(CompactSem); … … 3494 3494 IDS_WINCREATEWINDOW); 3495 3495 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3496 xfree(dcd, pszSrcFile, __LINE__);3496 free(dcd); 3497 3497 # ifdef FORTIFY 3498 3498 Fortify_LeaveScope(); -
trunk/dll/dirsize.c
r1038 r1039 154 154 strlen(pszFileName) < 4) { 155 155 if (*pchStopFlag) { 156 xfree(pffbArray, pszSrcFile, __LINE__);156 free(pffbArray); 157 157 return FALSE; 158 158 } -
trunk/dll/draglist.c
r1032 r1039 356 356 if (pDItem->hstrTargetName) 357 357 DrgDeleteStrHandle(pDItem->hstrTargetName); 358 xfree(pDItem, pszSrcFile, __LINE__);358 free(pDItem); 359 359 // Last item not yet count so only decrement by one less than loop count 360 360 // Unhilite code will adjust this when unhighliting … … 425 425 if (pDItem->hstrTargetName) 426 426 DrgDeleteStrHandle(pDItem->hstrTargetName); 427 xfree(pDItem, pszSrcFile, __LINE__);427 free(pDItem); 428 428 dcd->ulItemsToUnHilite = ulNumfiles + 1; // +1 to ensure non-zero 429 429 break; … … 471 471 if (pDItem->hstrTargetName) 472 472 DrgDeleteStrHandle(pDItem->hstrTargetName); 473 xfree(pDItem, pszSrcFile, __LINE__);473 free(pDItem); 474 474 // Last item not yet count so only decrement by one less than loop count 475 475 if (c > 1) { … … 562 562 FreeDragInfoData(hwndCnr, pDInfo); 563 563 } 564 565 if (ppDItem) 566 xfree(ppDItem, pszSrcFile, __LINE__); 564 xfree(ppDItem, pszSrcFile, __LINE__); 567 565 if (paDImgIcons && paDImgIcons != &dimgFakeIcon) 568 xfree(paDImgIcons, pszSrcFile, __LINE__);566 free(paDImgIcons); 569 567 DosPostEventSem(CompactSem); 570 568 MarkAll(hwndCnr, TRUE, FALSE, TRUE); … … 678 676 if (pDItem->hstrTargetName) 679 677 DrgDeleteStrHandle(pDItem->hstrTargetName); 680 xfree(pDItem, pszSrcFile, __LINE__);678 free(pDItem); 681 679 // pDItem = NULL; // Why bother, we can count - fixme to be gone 682 680 dcd->ulItemsToUnHilite = ulNumfiles + 1; -
trunk/dll/eas.c
r1029 r1039 41 41 #include "strutil.h" // GetPString 42 42 #include "fm3dll.h" 43 #include "fortify.h" 43 44 44 45 #pragma data_seg(DATA1) … … 867 868 memcpy(pfea, pfealist->list, 868 869 pfealist->cbList - sizeof(ULONG)); 869 xfree(eap->current->pfea, pszSrcFile, __LINE__);870 free(eap->current->pfea); 870 871 eap->current->pfea = pfea; 871 872 eap->current->name = eap->current->pfea->szName; … … 881 882 } 882 883 } 883 xfree(s, pszSrcFile, __LINE__);884 free(s); 884 885 } 885 886 } … … 912 913 rc = xDosSetPathInfo(eap->filename, FIL_QUERYEASIZE, 913 914 &eaop, sizeof(eaop), DSPI_WRTTHRU); 914 xfree(pfealist, pszSrcFile, __LINE__);915 free(pfealist); 915 916 if (rc) 916 917 Dos_Error(MB_CANCEL, rc, hwnd, pszSrcFile, __LINE__, … … 920 921 if (eap->current == eap->head) { 921 922 eap->head = eap->head->next; 922 xfree(eap->current->pfea, pszSrcFile, __LINE__);923 xfree(eap->current, pszSrcFile, __LINE__);923 free(eap->current->pfea); 924 free(eap->current); 924 925 eap->current = NULL; 925 926 } … … 930 931 sSelect++; 931 932 info->next = eap->current->next; 932 xfree(eap->current->pfea, pszSrcFile, __LINE__);933 xfree(eap->current, pszSrcFile, __LINE__);933 free(eap->current->pfea); 934 free(eap->current); 934 935 eap->current = NULL; 935 936 break; … … 987 988 if (eap->head) 988 989 Free_FEAList(eap->head); 989 xfree(eap, pszSrcFile, __LINE__);990 free(eap); 990 991 if (hptrIcon) 991 992 WinDestroyPointer(hptrIcon); … … 1276 1277 } 1277 1278 } 1278 xfree(pfealist, pszSrcFile, __LINE__);1279 free(pfealist); 1279 1280 } 1280 xfree(pgealist, pszSrcFile, __LINE__);1281 free(pgealist); 1281 1282 } 1282 1283 ulEntry += ulCount; 1283 1284 } // while 1284 xfree(pdena, pszSrcFile, __LINE__);1285 free(pdena); 1285 1286 DosPostEventSem(CompactSem); 1286 1287 } … … 1350 1351 } 1351 1352 else 1352 xfree(pfealist, pszSrcFile, __LINE__);1353 free(pfealist); 1353 1354 } 1354 1355 else { 1355 xfree(pfealist, pszSrcFile, __LINE__);1356 free(pfealist); 1356 1357 if (!silentfail) { 1357 1358 if (rc == ERROR_ACCESS_DENIED … … 1363 1364 pdena->szName); 1364 1365 if (rc == MBID_CANCEL) { 1365 xfree(pgealist, pszSrcFile, __LINE__);1366 free(pgealist); 1366 1367 break; 1367 1368 } … … 1378 1379 } 1379 1380 } 1380 xfree(pgealist, pszSrcFile, __LINE__);1381 free(pgealist); 1381 1382 } 1382 1383 ulEntry += ulCount; 1383 1384 } // while 1384 xfree(pdena, pszSrcFile, __LINE__);1385 free(pdena); 1385 1386 DosPostEventSem(CompactSem); 1386 1387 } … … 1400 1401 next = pFEA->next; 1401 1402 xfree(pFEA->pfea, pszSrcFile, __LINE__); 1402 xfree(pFEA, pszSrcFile, __LINE__);1403 free(pFEA); 1403 1404 pFEA = next; 1404 1405 } -
trunk/dll/filldir.c
r1038 r1039 309 309 pci->pszSubject = xstrdup(value + (sizeof(USHORT) * 2), pszSrcFile, __LINE__); 310 310 } 311 xfree(pfealist, pszSrcFile, __LINE__);312 } 313 xfree(pgealist, pszSrcFile, __LINE__);311 free(pfealist); 312 } 313 free(pgealist); 314 314 } 315 315 } … … 356 356 pci->pszLongName = xstrdup(value + (sizeof(USHORT) * 2), pszSrcFile, __LINE__); 357 357 } 358 xfree(pfealist, pszSrcFile, __LINE__);359 } 360 xfree(pgealist, pszSrcFile, __LINE__);358 free(pfealist); 359 } 360 free(pgealist); 361 361 } 362 362 } … … 538 538 pci->pszSubject = xstrdup(value + (sizeof(USHORT) * 2), pszSrcFile, __LINE__); 539 539 } 540 xfree(pfealist, pszSrcFile, __LINE__);541 } 542 xfree(pgealist, pszSrcFile, __LINE__);540 free(pfealist); 541 } 542 free(pgealist); 543 543 } 544 544 } … … 586 586 } 587 587 } 588 xfree(pfealist, pszSrcFile, __LINE__);589 } 590 xfree(pgealist, pszSrcFile, __LINE__);588 free(pfealist); 589 } 590 free(pgealist); 591 591 } 592 592 } -
trunk/dll/filter.c
r1009 r1039 31 31 #include "strutil.h" // GetPString 32 32 #include "fm3dll.h" 33 #include "fortify.h" 33 34 34 35 #pragma data_seg(FILTER_DATA) … … 154 155 } 155 156 else 156 xfree(info, pszSrcFile, __LINE__);157 free(info); 157 158 } 158 159 } … … 218 219 } 219 220 else 220 xfree(info, pszSrcFile, __LINE__);221 free(info); 221 222 } 222 223 } … … 239 240 maskhead = info->next; 240 241 xfree(info->mask, pszSrcFile, __LINE__); 241 xfree(info, pszSrcFile, __LINE__);242 free(info); 242 243 break; 243 244 } -
trunk/dll/grep.c
r1038 r1039 616 616 else if (!InsertDupe(grep, szFindPath, pffbFile)) { 617 617 DosFindClose(findHandle); 618 xfree(pffbArray, pszSrcFile, __LINE__);618 free(pffbArray); 619 619 # ifdef FORTIFY 620 620 Fortify_LeaveScope(); … … 645 645 } 646 646 647 xfree(pffbArray, pszSrcFile, __LINE__);647 free(pffbArray); 648 648 # ifdef FORTIFY 649 649 Fortify_LeaveScope(); … … 661 661 free(grep->insertffb[x]); 662 662 } 663 xfree(grep->insertffb, pszSrcFile, __LINE__);663 free(grep->insertffb); 664 664 } 665 665 if (grep->dir) { … … 667 667 free(grep->dir[x]); 668 668 } 669 xfree(grep->dir, pszSrcFile, __LINE__);669 free(grep->dir); 670 670 } 671 671 grep->dir = NULL; … … 782 782 pszSrcFile, __LINE__); 783 783 if (!grep->dir) { 784 xfree(grep->insertffb, pszSrcFile, __LINE__);784 free(grep->insertffb); 785 785 # ifdef FORTIFY 786 786 Fortify_LeaveScope(); … … 798 798 grep->dir[grep->toinsert] = xstrdup(szDirectory, pszSrcFile, __LINE__); 799 799 if (!grep->dir) { 800 xfree(grep->insertffb[grep->toinsert], pszSrcFile, __LINE__);800 free(grep->insertffb[grep->toinsert]); 801 801 # ifdef FORTIFY 802 802 Fortify_LeaveScope(); … … 1018 1018 fclose(inputFile); 1019 1019 } 1020 xfree(input, pszSrcFile, __LINE__);1020 free(input); 1021 1021 # ifdef FORTIFY 1022 1022 Fortify_LeaveScope(); … … 1135 1135 // DosSleep(1); // 07 Feb 08 SHL 1136 1136 } 1137 xfree(buffer, pszSrcFile, __LINE__);1137 free(buffer); 1138 1138 # ifdef FORTIFY 1139 1139 Fortify_LeaveScope(); … … 1628 1628 info->name = xstrdup(dir, pszSrcFile, __LINE__); 1629 1629 if (!info->name) { 1630 xfree(info, pszSrcFile, __LINE__);1630 free(info); 1631 1631 # ifdef FORTIFY 1632 1632 Fortify_LeaveScope(); -
trunk/dll/grep2.c
r1029 r1039 825 825 DosBeep(50, 100); 826 826 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, GREP_MASK)); 827 xfree(p, pszSrcFile, __LINE__);827 free(p); 828 828 # ifdef FORTIFY 829 829 Fortify_LeaveScope(); … … 927 927 Runtime_Error(pszSrcFile, __LINE__, 928 928 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 929 xfree(p, pszSrcFile, __LINE__);929 free(p); 930 930 # ifdef FORTIFY 931 931 Fortify_LeaveScope(); … … 935 935 } 936 936 DosSleep(100); //05 Aug 07 GKY 128 937 xfree(p, pszSrcFile, __LINE__);937 free(p); 938 938 # ifdef FORTIFY 939 939 Fortify_LeaveScope(); -
trunk/dll/info.c
r1009 r1039 44 44 #include "strutil.h" // GetPString 45 45 #include "fm3dll.h" 46 #include "fortify.h" 46 47 47 48 #pragma data_seg(DATA1) … … 464 465 if (pis->lasthwndMenu) 465 466 WinDestroyWindow(pis->lasthwndMenu); 466 xfree(pis, pszSrcFile, __LINE__);467 free(pis); 467 468 return oldproc(hwnd, msg, mp1, mp2); 468 469 } -
trunk/dll/inis.c
r1038 r1039 217 217 app2 : inirec->app), 218 218 pCurrentK, pData, ulSize); 219 xfree(pData, pszSrcFile, __LINE__); /* free data */219 free(pData); /* free data */ 220 220 } 221 221 } … … 225 225 } 226 226 } 227 xfree(pDataK, pszSrcFile, __LINE__); /* free keynames */227 free(pDataK); /* free keynames */ 228 228 } 229 229 } … … 261 261 inirec->key2 : inirec->key), 262 262 pData, ulSize); 263 xfree(pData, pszSrcFile, __LINE__); /* free data */263 free(pData); /* free data */ 264 264 } 265 265 } … … 296 296 PostMsg(inirec->hwndSource, WM_COMMAND, MPFROM2SHORT(INI_REFRESH, 0), 297 297 MPVOID); 298 xfree(inirec, pszSrcFile, __LINE__);298 free(inirec); 299 299 # ifdef FORTIFY 300 300 Fortify_LeaveScope(); … … 324 324 WinTerminate(hab2); 325 325 } 326 xfree(inirec, pszSrcFile, __LINE__);326 free(inirec); 327 327 } 328 328 } … … 413 413 pCurrentK, pData, 414 414 ulSize); 415 xfree(pData, pszSrcFile, __LINE__); /* free data */415 free(pData); /* free data */ 416 416 } 417 417 } … … 421 421 } 422 422 } 423 xfree(pDataK, pszSrcFile, __LINE__); /* free keynames */423 free(pDataK); /* free keynames */ 424 424 } 425 425 } … … 429 429 } 430 430 } 431 xfree(pDataA, pszSrcFile, __LINE__); /* free applnames */431 free(pDataA); /* free applnames */ 432 432 } 433 433 } … … 443 443 xfree(prfp->pszUserName, pszSrcFile, __LINE__); 444 444 xfree(prfp->pszSysName, pszSrcFile, __LINE__); 445 xfree(prfp, pszSrcFile, __LINE__);445 free(prfp); 446 446 # ifdef FORTIFY 447 447 Fortify_LeaveScope(); … … 479 479 WinEnableWindowUpdate(hwndList, TRUE); 480 480 } 481 xfree(pData, pszSrcFile, __LINE__);481 free(pData); 482 482 } 483 483 } … … 538 538 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, 539 539 "PrfQueryProfileString"); 540 xfree(pData, pszSrcFile, __LINE__);540 free(pData); 541 541 } 542 542 else { … … 553 553 MPFROMSHORT(TRUE)); 554 554 WinEnableWindowUpdate(hwndList, TRUE); 555 xfree(pData, pszSrcFile, __LINE__);555 free(pData); 556 556 return TRUE; 557 557 } … … 1330 1330 fixup(inidata->data, p, l, inidata->datalen); 1331 1331 WinSetDlgItemText(hwnd, IAD_DATA, p); 1332 xfree(p, pszSrcFile, __LINE__);1332 free(p); 1333 1333 } 1334 1334 } … … 1493 1493 hINI = PrfOpenProfile(useHab, filename); 1494 1494 if (hINI == NULLHANDLE) { 1495 xfree(filename, pszSrcFile, __LINE__);1495 free(filename); 1496 1496 return (HWND) 0; 1497 1497 } … … 1544 1544 } 1545 1545 else 1546 xfree(filename, pszSrcFile, __LINE__);1546 free(filename); 1547 1547 return hwndFrame; 1548 1548 } … … 2041 2041 inidata->hini = PrfOpenProfile(WinQueryAnchorBlock(hwnd), 2042 2042 inidata->ininame); 2043 xfree(mp1, pszSrcFile, __LINE__);2043 free(mp1); 2044 2044 } 2045 2045 else … … 2358 2358 Runtime_Error(pszSrcFile, __LINE__, 2359 2359 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2360 xfree(inirec, pszSrcFile, __LINE__);2360 free(inirec); 2361 2361 } 2362 2362 } … … 2378 2378 Runtime_Error(pszSrcFile, __LINE__, 2379 2379 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2380 xfree(inirec, pszSrcFile, __LINE__);2380 free(inirec); 2381 2381 } 2382 2382 } … … 2418 2418 IntraIniProc, 2419 2419 FM3ModHandle, INII_FRAME, (PVOID) inirec)) { 2420 xfree(inirec, pszSrcFile, __LINE__);2420 free(inirec); 2421 2421 break; 2422 2422 } … … 2424 2424 Runtime_Error(pszSrcFile, __LINE__, 2425 2425 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2426 xfree(inirec, pszSrcFile, __LINE__);2426 free(inirec); 2427 2427 } 2428 2428 } … … 2462 2462 xstrdup(inidata->ininame, pszSrcFile, __LINE__); 2463 2463 if (!prfp->pszUserName) 2464 xfree(prfp, pszSrcFile, __LINE__);2464 free(prfp); 2465 2465 else { 2466 2466 prfp->cchUserName = strlen(prfp->pszUserName); 2467 2467 prfp->pszSysName = xstrdup(filename, pszSrcFile, __LINE__); 2468 2468 if (!prfp->pszSysName) { 2469 xfree(prfp->pszUserName, pszSrcFile, __LINE__);2470 xfree(prfp, pszSrcFile, __LINE__);2469 free(prfp->pszUserName); 2470 free(prfp); 2471 2471 } 2472 2472 else { … … 2476 2476 Runtime_Error(pszSrcFile, __LINE__, 2477 2477 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 2478 xfree(prfp->pszSysName, pszSrcFile, __LINE__);2479 xfree(prfp->pszUserName, pszSrcFile, __LINE__);2480 xfree(prfp, pszSrcFile, __LINE__);2478 free(prfp->pszSysName); 2479 free(prfp->pszUserName); 2480 free(prfp); 2481 2481 } 2482 2482 else … … 2777 2777 if (inidata->hini != NULLHANDLE && *inidata->ininame) 2778 2778 CloseProfile(inidata->hini, FALSE); 2779 xfree(inidata->data, pszSrcFile, __LINE__);2779 free(inidata->data); 2780 2780 if (inidata->hwndPopup) 2781 2781 WinDestroyWindow(inidata->hwndPopup); 2782 xfree(inidata, pszSrcFile, __LINE__);2782 free(inidata); 2783 2783 } 2784 2784 if (!dontclose && -
trunk/dll/literal.c
r1009 r1039 32 32 #include "errutil.h" // Dos_Error... 33 33 #include "fm3dll.h" 34 #include "fortify.h" 34 35 35 36 static PSZ pszSrcFile = __FILE__; … … 194 195 cBufBytes = pszOut - pszWork; /* Calc string length excluding terminator */ 195 196 memcpy(pszBuf, pszWork, cBufBytes + 1); /* Overwrite including terminator */ 196 xfree(pszWork, pszSrcFile, __LINE__);197 free(pszWork); 197 198 198 199 return cBufBytes; /* Return string length */ … … 280 281 return (*fstr == *fcard); 281 282 } 282 283 284 /*BOOL wildcard(const PSZ pszBuf, const PSZ pszWildCard,285 const BOOL fNotFileSpec)286 {287 const CHAR *fstr = pszBuf;288 PSZ fcard = pszWildCard;289 CHAR *tcard;290 INT wmatch = TRUE;291 BOOL reverse = FALSE;292 293 while (wmatch && *fcard && *fstr) {294 if (*fcard == '*' && fcard[strlen(fcard) - 1] == '*' && !reverse){295 tcard = xstrdup(fcard + 1, __FILE__, __LINE__);296 tcard[strlen(tcard) - 1] = 0;297 if (!(strchr(tcard, '?')) && !(strchr(tcard, '*'))){298 if (strstr(fstr, tcard)){ //strstr match for *stuff* pattern no wildcards in "stuff"299 xfree(tcard, pszSrcFile, __LINE__);300 return TRUE;301 }302 else{303 xfree(tcard, pszSrcFile, __LINE__);304 return FALSE;305 }306 }307 xfree(tcard, pszSrcFile, __LINE__);308 }309 else //reverse search for *stuff pattern "stuff" can contain wildcards310 if (*fcard == '*' && fcard[strlen(fcard) - 1] != '*'){311 fstr = strrev(pszBuf);312 fcard = strrev(pszWildCard);313 reverse = TRUE;314 }315 switch (*fcard) { //fm2 standard forward search for all other cases316 case '?': // character substitution /317 fcard++;318 if (fNotFileSpec || (*fstr != '.' && *fstr != '/' && *fstr != '\\'))319 fstr++; // skip (match) next character320 break;321 322 case '*':323 // find next non-wild character in wildcard324 while (*fcard && (*fcard == '?' || *fcard == '*'))325 fcard++;326 if (!*fcard){ // if last char of wildcard is *, it matches327 if (reverse){328 fstr = strrev(pszBuf);329 fcard = strrev(pszWildCard);330 }331 return TRUE;332 }333 // skip until partition, match, or eos334 while (*fstr && toupper(*fstr) != toupper(*fcard) &&335 (fNotFileSpec || (*fstr != '\\' &&336 *fstr != '/' && *fstr != '.')))337 fstr++;338 if (!fNotFileSpec && !*fstr) // implicit '.'339 if (*fcard == '.')340 fcard++;341 break;342 343 default:344 if (!fNotFileSpec && ((*fstr == '/' || *fstr == '\\') &&345 (*fcard == '/' || *fcard == '\\')))346 wmatch = TRUE;347 else348 wmatch = (toupper(*fstr) == toupper(*fcard));349 fstr++;350 fcard++;351 break;352 }353 } //while354 355 if ((*fcard && *fcard != '*') || *fstr){356 if (reverse){357 fstr = strrev(pszBuf);358 fcard = strrev(pszWildCard);359 }360 return 0;361 }362 else {363 if (reverse){364 fstr = strrev(pszBuf);365 fcard = strrev(pszWildCard);366 }367 return wmatch;368 }369 } */370 371 283 372 284 // fixup - quote literal character array -
trunk/dll/mainwnd.c
r1037 r1039 520 520 WinSetMultWindowPos(WinQueryAnchorBlock(hwnd), &swp[2], numtools); 521 521 } 522 xfree(swp, pszSrcFile, __LINE__);522 free(swp); 523 523 } 524 524 WinInvalidateRect(hwnd, NULL, TRUE); … … 1014 1014 } 1015 1015 } 1016 xfree(s, pszSrcFile, __LINE__);1016 free(s); 1017 1017 } 1018 1018 } … … 1560 1560 PostMsg(hwnd, UM_FOCUSME, MPVOID, MPVOID); 1561 1561 PostMsg(hwnd, UM_SETUP, MPVOID, MPVOID); 1562 xfree(pszCmdLine, pszSrcFile, __LINE__);1562 free(pszCmdLine); 1563 1563 } 1564 1564 } … … 6262 6262 MPFROMP(pszStateName), 6263 6263 MPVOID)) { 6264 xfree(pszStateName, pszSrcFile, __LINE__);6264 free(pszStateName); 6265 6265 } 6266 6266 } … … 6336 6336 if (!PostMsg(MainObjectHwnd, UM_RESTORE, MPFROMP(pszDefaultStateName), MPVOID)) 6337 6337 // 05 Feb 08 SHL fixme to complain? 6338 xfree(pszDefaultStateName, pszSrcFile, __LINE__);6338 free(pszDefaultStateName); 6339 6339 } 6340 6340 } -
trunk/dll/mainwnd2.c
r1009 r1039 48 48 #include "command.h" // RunCommand 49 49 #include "fm3dll.h" 50 #include "fortify.h" 50 51 51 52 typedef struct -
trunk/dll/makelist.c
r1038 r1039 75 75 if (li->list) 76 76 FreeList(li->list); 77 xfree(li, pszSrcFile, __LINE__);77 free(li); 78 78 # ifdef FORTIFY 79 79 //Fortify_LeaveScope(); … … 96 96 _heap_check(); 97 97 #endif 98 xfree(list, pszSrcFile, __LINE__);98 free(list); 99 99 # ifdef FORTIFY 100 100 //Fortify_LeaveScope(); -
trunk/dll/menu.c
r1009 r1039 27 27 #include "errutil.h" // Dos_Error... 28 28 #include "fm3dll.h" 29 #include "fortify.h" 29 30 30 31 #pragma data_seg(DATA2) … … 69 70 next = info->next; 70 71 xfree(info->text, pszSrcFile, __LINE__); 71 xfree(info, pszSrcFile, __LINE__);72 free(info); 72 73 info = next; 73 74 } … … 107 108 info->text = xstrdup(tokens[2], pszSrcFile, __LINE__); 108 109 if (!info->text) 109 xfree(info, pszSrcFile, __LINE__);110 free(info); 110 111 else { 111 112 if (!stricmp(tokens[0], "MENUITEM")) … … 116 117 /* error! */ 117 118 xfree(info->text, pszSrcFile, __LINE__); 118 xfree(info, pszSrcFile, __LINE__);119 free(info); 119 120 info = NULL; 120 121 } -
trunk/dll/misc.c
r1030 r1039 67 67 #include "command.h" // LINKCMDS 68 68 #include "fm3dll.h" 69 #include "fortify.h" 69 70 70 71 #pragma data_seg(DATA1) … … 232 233 } 233 234 } 234 xfree(s, pszSrcFile, __LINE__);235 free(s); 235 236 } 236 237 if (releaseme) … … 851 852 if (!PostMsg(hwnd, 852 853 UM_FIXEDITNAME, MPVOID, MPFROMP(filename))) 853 xfree(filename, pszSrcFile, __LINE__);854 free(filename); 854 855 } 855 856 if (stricmp(testname, pci->pszFileName)) { … … 859 860 if (!PostMsg(hwnd, 860 861 UM_FIXEDITNAME, MPVOID, MPFROMP(filename))) 861 xfree(filename, pszSrcFile, __LINE__);862 free(filename); 862 863 } 863 864 } … … 1005 1006 else if (ret != 0) 1006 1007 return -1; 1007 xfree(pszCmdLine, pszSrcFile, __LINE__);1008 free(pszCmdLine); 1008 1009 } 1009 1010 return 0; … … 1998 1999 GetPString(IDS_SUBJ) : GetPString(IDS_NAME)); 1999 2000 WinSetWindowText(hwnd, s); 2000 xfree(s, pszSrcFile, __LINE__);2001 free(s); 2001 2002 } 2002 2003 } … … 2017 2018 !(flWindowAttr & CV_TEXT)) ? GetPString(IDS_MINI) : NullStr); 2018 2019 WinSetWindowText(hwnd, s); 2019 xfree(s, pszSrcFile, __LINE__);2020 free(s); 2020 2021 } 2021 2022 } … … 2037 2038 sprintf(s, "F:%s", GetPString(IDS_ALLTEXT)); 2038 2039 WinSetWindowText(hwnd, s); 2039 xfree(s, pszSrcFile, __LINE__);2040 free(s); 2040 2041 } 2041 2042 } … … 2182 2183 } 2183 2184 numswitches = y; 2184 xfree(pswb, pszSrcFile, __LINE__);2185 free(pswb); 2185 2186 DosPostEventSem(CompactSem); 2186 2187 } -
trunk/dll/mle.c
r1029 r1039 252 252 Dos_Error(MB_CANCEL, rc, h, pszSrcFile, __LINE__, 253 253 GetPString(IDS_OUTOFMEMORY)); 254 xfree(sel, pszSrcFile, __LINE__);254 free(sel); 255 255 # ifdef FORTIFY 256 256 Fortify_LeaveScope(); … … 272 272 if (sellen < 1) { 273 273 Runtime_Error(pszSrcFile, __LINE__, "len < 1"); 274 xfree(sel, pszSrcFile, __LINE__);274 free(sel); 275 275 # ifdef FORTIFY 276 276 Fortify_LeaveScope(); … … 289 289 SaveToClip(h, sel, TRUE); 290 290 DosFreeMem(temp); 291 xfree(sel, pszSrcFile, __LINE__);291 free(sel); 292 292 # ifdef FORTIFY 293 293 Fortify_LeaveScope(); … … 313 313 #endif 314 314 DosFreeMem(temp); 315 xfree(sel, pszSrcFile, __LINE__);315 free(sel); 316 316 # ifdef FORTIFY 317 317 Fortify_LeaveScope(); … … 389 389 #endif 390 390 DosFreeMem(temp); 391 xfree(sel, pszSrcFile, __LINE__);391 free(sel); 392 392 # ifdef FORTIFY 393 393 Fortify_LeaveScope(); … … 425 425 #endif 426 426 DosFreeMem(temp); 427 xfree(sel, pszSrcFile, __LINE__);427 free(sel); 428 428 # ifdef FORTIFY 429 429 Fortify_LeaveScope(); … … 594 594 else 595 595 ret = FALSE; 596 xfree(buffer, pszSrcFile, __LINE__);596 free(buffer); 597 597 # ifdef FORTIFY 598 598 Fortify_LeaveScope(); … … 796 796 _heap_check(); 797 797 #endif 798 //xfree(bkg, pszSrcFile, __LINE__);799 798 WinDestroyMsgQueue(thmq); 800 799 } 800 else 801 PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID); 801 802 DecrThreadUsage(); 802 803 WinTerminate(thab); 803 xfree(bkg, pszSrcFile, __LINE__);804 free(bkg); 804 805 bkg = NULL; 805 806 # ifdef FORTIFY … … 809 810 } 810 811 // fixme to be gone? 811 if (bkg){812 else { 812 813 PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID); 813 xfree(bkg, pszSrcFile, __LINE__);814 free(bkg); 814 815 # ifdef FORTIFY 815 816 Fortify_LeaveScope(); -
trunk/dll/newview.c
r1038 r1039 1442 1442 __LINE__, 1443 1443 GetPString(IDS_ERRORREADINGTEXT), ad->filename); 1444 xfree(ad->text, pszSrcFile, __LINE__);1444 free(ad->text); 1445 1445 ad->text = NULL; 1446 1446 ad->textsize = 0; … … 2400 2400 switch (ret) { 2401 2401 case 0: 2402 xfree(urld, pszSrcFile, __LINE__);2402 free(urld); 2403 2403 goto NoAdd; 2404 2404 case 1: … … 2426 2426 "%s %s", httprun, urld->url); 2427 2427 } 2428 xfree(urld, pszSrcFile, __LINE__);2428 free(urld); 2429 2429 goto NoAdd; 2430 2430 case 2: … … 2452 2452 "%s %s", ftprun, urld->url); 2453 2453 } 2454 xfree(urld, pszSrcFile, __LINE__);2454 free(urld); 2455 2455 goto NoAdd; 2456 2456 case 3: … … 2462 2462 "%s %s", mailrun, urld->url); 2463 2463 } 2464 xfree(urld, pszSrcFile, __LINE__);2464 free(urld); 2465 2465 goto NoAdd; 2466 2466 default: 2467 2467 break; 2468 2468 } 2469 xfree(urld, pszSrcFile, __LINE__);2469 free(urld); 2470 2470 } 2471 2471 } … … 2545 2545 MPFROMLONG(whichline)); 2546 2546 } 2547 xfree(s, pszSrcFile, __LINE__);2547 free(s); 2548 2548 } 2549 2549 } … … 3958 3958 FreeViewerMem(hwnd); 3959 3959 WinSetWindowPtr(hwnd, QWL_USER, NULL); 3960 xfree(ad, pszSrcFile, __LINE__);3960 free(ad); 3961 3961 } 3962 3962 if (hwndRestore && hwndRestore != HWND_DESKTOP) { -
trunk/dll/notebook.c
r1009 r1039 51 51 #include "notebook.h" 52 52 #include "fm3dll.h" 53 #include "fortify.h" 53 54 54 55 #pragma data_seg(DATA2) … … 214 215 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 215 216 if (!pszWorkBuf) { 216 xfree(szCLBuf, pszSrcFile, __LINE__);217 free(szCLBuf); 217 218 return 0; //already complained 218 219 } … … 222 223 NormalizeCmdLine(pszWorkBuf, szCLBuf); 223 224 memcpy(virus, pszWorkBuf, strlen(pszWorkBuf) + 1); 224 xfree(pszWorkBuf, pszSrcFile, __LINE__);225 xfree(szCLBuf, pszSrcFile, __LINE__);225 free(pszWorkBuf); 226 free(szCLBuf); 226 227 if (!strchr(virus, '%') && strlen(virus) > 3) 227 228 strcat(virus, " %p"); … … 487 488 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 488 489 if (!pszWorkBuf) { 489 xfree(szCLBuf, pszSrcFile, __LINE__);490 free(szCLBuf); 490 491 return 0; //already complained 491 492 } … … 522 523 strcat(bined, " %a"); 523 524 } 524 xfree(pszWorkBuf, pszSrcFile, __LINE__);525 xfree(szCLBuf, pszSrcFile, __LINE__);525 free(pszWorkBuf); 526 free(szCLBuf); 526 527 PrfWriteProfileString(fmprof, appname, "Viewer", viewer); 527 528 PrfWriteProfileString(fmprof, appname, "Editor", editor); … … 690 691 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 691 692 if (!pszWorkBuf) { 692 xfree(szCLBuf, pszSrcFile, __LINE__);693 free(szCLBuf); 693 694 return 0; //already complained 694 695 } … … 723 724 memcpy(mailrun, pszWorkBuf, strlen(pszWorkBuf) + 1); 724 725 } 725 xfree(pszWorkBuf, pszSrcFile, __LINE__);726 xfree(szCLBuf, pszSrcFile, __LINE__);726 free(pszWorkBuf); 727 free(szCLBuf); 727 728 PrfWriteProfileString(fmprof, appname, "HttpRunDir", httprundir); 728 729 PrfWriteProfileString(fmprof, appname, "FtpRunDir", ftprundir); … … 1326 1327 pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 1327 1328 if (!pszWorkBuf) { 1328 xfree(szCLBuf, pszSrcFile, __LINE__);1329 free(szCLBuf); 1329 1330 return 0; //already complained 1330 1331 } … … 1346 1347 strcat(compare, " %a"); 1347 1348 } 1348 xfree(pszWorkBuf, pszSrcFile, __LINE__);1349 xfree(szCLBuf, pszSrcFile, __LINE__);1349 free(pszWorkBuf); 1350 free(szCLBuf); 1350 1351 PrfWriteProfileString(fmprof, appname, "Compare", compare); 1351 1352 break; -
trunk/dll/notify.c
r1038 r1039 198 198 199 199 if (p != str) 200 xfree(p, pszSrcFile, __LINE__);200 free(p); 201 201 if (id > NOTE_MAX) 202 202 id = NOTE_FRAME; … … 275 275 LM_INSERTITEM, MPFROM2SHORT(LIT_END, 0), mp2); 276 276 PostMsg(hwndNotify, UM_NOTIFY, MPVOID, MPVOID); 277 xfree((CHAR *)mp2, pszSrcFile, __LINE__);277 free((CHAR *)mp2); 278 278 } 279 279 WinDismissDlg(hwnd, 0); … … 292 292 NOTE_LISTBOX, 293 293 LM_INSERTITEM, MPFROM2SHORT(LIT_END, 0), mp2); 294 xfree((CHAR *)mp2, pszSrcFile, __LINE__);294 free((CHAR *)mp2); 295 295 } 296 296 … … 505 505 PostMsg(hwndNotify, UM_CONTAINER_FILLED, MPVOID, MPVOID); 506 506 once = TRUE; 507 } 507 } 508 free(s); 508 509 } 509 xfree(s, pszSrcFile, __LINE__);510 510 } 511 511 } -
trunk/dll/objcnr.c
r1038 r1039 109 109 if (!pciP) { 110 110 Win_Error(hwndCnr, HWND_DESKTOP, pszSrcFile, __LINE__, "CM_ALLOCRECORD"); 111 xfree(pffbArray, pszSrcFile, __LINE__);111 free(pffbArray); 112 112 return; 113 113 } … … 134 134 } 135 135 else { 136 xfree(pffbArray, pszSrcFile, __LINE__);136 free(pffbArray); 137 137 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 138 138 GetPString(IDS_CANTFINDDIRTEXT), filename); … … 155 155 ri.fInvalidateRecord = TRUE; 156 156 if (!WinSendMsg(hwndCnr, CM_INSERTRECORD, MPFROMP(pciP), MPFROMP(&ri))) { 157 xfree(pffbArray, pszSrcFile, __LINE__);157 free(pffbArray); 158 158 return; 159 159 } … … 204 204 } 205 205 206 xfree(pffbArray, pszSrcFile, __LINE__);206 free(pffbArray); 207 207 WinSendMsg(hwndCnr, CM_INVALIDATERECORD, MPFROMP(&pciP), 208 208 MPFROM2SHORT(1, 0)); … … 239 239 PostMsg(WinQueryWindow(dirsize->hwndCnr, QW_PARENT), UM_CONTAINER_FILLED, 240 240 MPVOID, MPVOID); 241 xfree(dirsize, pszSrcFile, __LINE__);241 free(dirsize); 242 242 # ifdef FORTIFY 243 243 Fortify_LeaveScope(); … … 290 290 Runtime_Error(pszSrcFile, __LINE__, 291 291 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 292 xfree(dirsize, pszSrcFile, __LINE__);292 free(dirsize); 293 293 # ifdef FORTIFY 294 294 Fortify_LeaveScope(); -
trunk/dll/pathutil.c
r1009 r1039 16 16 ***********************************************************************/ 17 17 18 #include <stdlib.h> 18 19 #include <string.h> 19 20 … … 27 28 #include "errutil.h" // Dos_Error... 28 29 #include "strutil.h" // GetPString 30 #include "fortify.h" 29 31 30 32 static PSZ pszSrcFile = __FILE__; … … 132 134 szArgs = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__); 133 135 if (!szArgs) { 134 xfree(szCmdLine, pszSrcFile, __LINE__);136 free(szCmdLine); 135 137 return pszCmdLine_; //already complained 136 138 } … … 333 335 } 334 336 } 335 xfree(szArgs, pszSrcFile, __LINE__);336 xfree(szCmdLine, pszSrcFile, __LINE__);337 free(szArgs); 338 free(szCmdLine); 337 339 return pszWorkBuf; 338 340 } -
trunk/dll/presparm.c
r1009 r1039 23 23 24 24 #include "fm3dll.h" 25 #include "fortify.h" 25 26 26 27 // static PSZ pszSrcFile = __FILE__; … … 308 309 appname, tagname, ppresparams, ppresparams->cb + 4); 309 310 310 xfree(ppresparams, pszSrcFile, __LINE__);311 free(ppresparams); 311 312 } 312 313 -
trunk/dll/remap.c
r1009 r1039 31 31 #include "strutil.h" // GetPString 32 32 #include "fm3dll.h" 33 #include "fortify.h" 33 34 34 35 #pragma data_seg(DATA1) … … 84 85 info->res = xstrdup(s, pszSrcFile, __LINE__); 85 86 if (!info->res) 86 xfree(info, pszSrcFile, __LINE__);87 free(info); 87 88 else { 88 89 x++; … … 152 153 info->res = xstrdup(res, pszSrcFile, __LINE__); 153 154 if (!info->res) 154 xfree(info, pszSrcFile, __LINE__);155 free(info); 155 156 else { 156 157 info->next = NULL; … … 162 163 info = reshead; 163 164 reshead = reshead->next; 164 xfree(info, pszSrcFile, __LINE__);165 free(info); 165 166 } 166 167 return TRUE; … … 186 187 reshead = info->next; 187 188 xfree(info->res, pszSrcFile, __LINE__); 188 xfree(info, pszSrcFile, __LINE__);189 free(info); 189 190 return TRUE; 190 191 } … … 203 204 next = info->next; 204 205 xfree(info->res, pszSrcFile, __LINE__); 205 xfree(info, pszSrcFile, __LINE__);206 free(info); 206 207 info = next; 207 208 } … … 440 441 "%s", GetPString(IDS_CANTSTARTNETUSETEXT)); 441 442 if (!mp2 || (ULONG) mp2 == 1041 || info->failedonce) 442 xfree(info, pszSrcFile, __LINE__);443 free(info); 443 444 break; 444 445 } … … 729 730 while (info) { 730 731 next = info->next; 731 xfree(info, pszSrcFile, __LINE__);732 free(info); 732 733 info = next; 733 734 } -
trunk/dll/saveclip.c
r1009 r1039 39 39 #include "strutil.h" // GetPString 40 40 #include "fm3dll.h" 41 #include "fortify.h" 41 42 42 43 static PSZ pszSrcFile = __FILE__; … … 187 188 p = strchr(pp, '\n'); 188 189 } 189 xfree(text, pszSrcFile, __LINE__);190 free(text); 190 191 } 191 192 } … … 840 841 subject[1023] = 0; 841 842 } 842 xfree(pfealist, pszSrcFile, __LINE__);843 free(pfealist); 843 844 } 844 xfree(pgealist, pszSrcFile, __LINE__);845 free(pgealist); 845 846 } 846 847 } … … 883 884 longname[CCHMAXPATHCOMP - 1] = 0; 884 885 } 885 xfree(pfealist, pszSrcFile, __LINE__);886 free(pfealist); 886 887 } 887 xfree(pgealist, pszSrcFile, __LINE__);888 free(pgealist); 888 889 } 889 890 } -
trunk/dll/seeall.c
r1038 r1039 1315 1315 xfree(ad->afhead[x].fullname, pszSrcFile, __LINE__); 1316 1316 } 1317 xfree(ad->afhead, pszSrcFile, __LINE__);1317 free(ad->afhead); 1318 1318 ad->afhead = NULL; 1319 1319 xfree(ad->afindex, pszSrcFile, __LINE__); … … 1936 1936 pffbArray = xmalloc(ulBufBytes, pszSrcFile, __LINE__); 1937 1937 if (!pffbArray) { 1938 xfree(filename, pszSrcFile, __LINE__);1938 free(filename); 1939 1939 return; 1940 1940 } … … 1974 1974 // Complain if pathnames exceeds max 1975 1975 DosFindClose(hdir); 1976 xfree(pffbArray, pszSrcFile, __LINE__);1977 xfree(filename, pszSrcFile, __LINE__);1976 free(pffbArray); 1977 free(filename); 1978 1978 if (!fDone) { 1979 1979 fDone = TRUE; … … 2042 2042 } 2043 2043 2044 xfree(pffbArray, pszSrcFile, __LINE__);2045 xfree(filename, pszSrcFile, __LINE__);2044 free(pffbArray); 2045 free(filename); 2046 2046 } 2047 2047 … … 4292 4292 } 4293 4293 FreeAllFilesList(hwnd); 4294 xfree(pAD, pszSrcFile, __LINE__);4294 free(pAD); 4295 4295 # ifdef FORTIFY 4296 4296 Fortify_LeaveScope(); -
trunk/dll/select.c
r1009 r1039 48 48 #include "strutil.h" // GetPString 49 49 #include "fm3dll.h" 50 #include "fortify.h" 50 51 51 52 static PSZ pszSrcFile = __FILE__; … … 258 259 fclose(inputFile); 259 260 } 260 xfree(input, pszSrcFile, __LINE__);261 free(input); 261 262 DosSleep(1); 262 263 } … … 361 362 fclose(inputFile); 362 363 } 363 xfree(input, pszSrcFile, __LINE__);364 free(input); 364 365 DosSleep(1); 365 366 } -
trunk/dll/seticon.c
r1009 r1039 26 26 #include "errutil.h" // Dos_Error... 27 27 #include "fm3dll.h" 28 #include "fortify.h" 28 29 29 30 #pragma data_seg(DATA2) … … 93 94 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, "WinSetSysPointerData"); 94 95 } 95 xfree(buff, pszSrcFile, __LINE__);96 free(buff); 96 97 } 97 98 WinDismissDlg(hwnd, 1); -
trunk/dll/shadow.c
r1009 r1039 30 30 #include "strutil.h" // GetPString 31 31 #include "fm3dll.h" 32 #include "fortify.h" 32 33 33 34 #pragma data_seg(DATA1) … … 57 58 (path) ? ";STARTUPDIR=" : "", (path) ? path : "", objtitle); 58 59 WinSetObjectData(obj, s); 59 xfree(s, pszSrcFile, __LINE__);60 free(s); 60 61 } 61 62 } … … 158 159 objtitle, 159 160 s, (location) ? location : cnr, CO_FAILIFEXISTS); 160 xfree(s, pszSrcFile, __LINE__);161 free(s); 161 162 } 162 163 return obj; -
trunk/dll/subj.c
r1009 r1039 32 32 #include "strutil.h" // GetPString 33 33 #include "fm3dll.h" 34 #include "fortify.h" 34 35 35 36 static PSZ pszSrcFile = __FILE__; … … 57 58 pfealist = xmallocz(1024, pszSrcFile, __LINE__); 58 59 if (pfealist) 59 xfree(pgealist, pszSrcFile, __LINE__);60 free(pgealist); 60 61 else { 61 62 pfealist->cbList = 1024; … … 65 66 rc = DosQueryPathInfo(filename, FIL_QUERYEASFROMLIST, 66 67 (PVOID) & eaop, (ULONG) sizeof(EAOP2)); 67 xfree(pgealist, pszSrcFile, __LINE__);68 free(pgealist); 68 69 if (!rc) { 69 70 pfea = &eaop.fpFEA2List->list[0]; … … 74 75 subject[1023] = 0; 75 76 } 76 xfree(pfealist, pszSrcFile, __LINE__);77 free(pfealist); 77 78 if (rc == ERROR_SHARING_VIOLATION || rc == ERROR_ACCESS_DENIED) { 78 79 saymsg(MB_CANCEL, -
trunk/dll/systemf.c
r1021 r1039 44 44 #include "pathutil.h" 45 45 #include "fm3dll.h" 46 #include "fortify.h" 46 47 47 48 static PSZ pszSrcFile = __FILE__; … … 599 600 EXEC_FRAME, &ex); 600 601 if (ret != 1) { 601 xfree(commandline, pszSrcFile, __LINE__);602 free(commandline); 602 603 return (ret == 0) ? -1 : -2; 603 604 } … … 609 610 (*ex.environment) ? ex.environment : NULL, 610 611 "%s", commandline); 611 xfree(commandline, pszSrcFile, __LINE__);612 free(commandline); 612 613 return ret; 613 614 } … … 1305 1306 strcpy(executable, GetCmdSpec(FALSE)); 1306 1307 } 1307 xfree(temp, pszSrcFile, __LINE__);1308 free(temp); 1308 1309 } 1309 1310 } … … 1319 1320 pgd.swpInitial.hwndInsertBehind = HWND_TOP; 1320 1321 happ = WinStartApp(hwndNotify, &pgd, NULL, NULL, ulOptions); 1321 xfree(parameters, pszSrcFile, __LINE__);1322 free(parameters); 1322 1323 } 1323 1324 } 1324 xfree(executable, pszSrcFile, __LINE__);1325 free(executable); 1325 1326 } 1326 1327 return happ; -
trunk/dll/tools.c
r1009 r1039 35 35 #include "strutil.h" // GetPString 36 36 #include "fm3dll.h" 37 #include "fortify.h" 37 38 38 39 #pragma data_seg(DATA1) … … 52 53 qtloaded = TRUE; 53 54 for (x = 0; x < 50 && quicktool[x]; x++) { 54 xfree(quicktool[x], pszSrcFile, __LINE__);55 free(quicktool[x]); 55 56 quicktool[x] = NULL; 56 57 } … … 268 269 xfree(info->help, pszSrcFile, __LINE__); 269 270 xfree(info->text, pszSrcFile, __LINE__); 270 xfree(info, pszSrcFile, __LINE__);271 free(info); 271 272 fToolsChanged = TRUE; 272 273 break; … … 366 367 xfree(tool->help, pszSrcFile, __LINE__); 367 368 xfree(tool->text, pszSrcFile, __LINE__); 368 xfree(tool, pszSrcFile, __LINE__);369 free(tool); 369 370 tool = next; 370 371 } -
trunk/dll/treecnr.c
r1037 r1039 569 569 fTopDir = temptop; 570 570 } 571 xfree((CHAR *)mp1, pszSrcFile, __LINE__);571 free((CHAR *)mp1); 572 572 } 573 573 return 0; … … 803 803 Runtime_Error(pszSrcFile, __LINE__, 804 804 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 805 xfree(wk, pszSrcFile, __LINE__);805 free(wk); 806 806 # ifdef FORTIFY 807 807 Fortify_LeaveScope(); … … 839 839 Runtime_Error(pszSrcFile, __LINE__, 840 840 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 841 xfree(wk, pszSrcFile, __LINE__);841 free(wk); 842 842 # ifdef FORTIFY 843 843 Fortify_LeaveScope(); … … 860 860 WinSendMsg(dcd->hwndCnr, 861 861 UM_CLOSE, MPFROMLONG(dcd->dontclose != FALSE), MPVOID); 862 xfree(dcd, pszSrcFile, __LINE__);862 free(dcd); 863 863 # ifdef FORTIFY 864 864 Fortify_LeaveScope(); … … 1735 1735 if (dir) { 1736 1736 if (!PostMsg(dcd->hwndObject, UM_SHOWME, MPFROMP(dir), MPVOID)) 1737 xfree(dir, pszSrcFile, __LINE__);1737 free(dir); 1738 1738 } 1739 1739 } … … 2179 2179 hwnd = StartMLEEditor(dcd->hwndParent, 2180 2180 (INT)mp1, (CHAR *)mp2, dcd->hwndFrame); 2181 xfree((CHAR *)mp2, pszSrcFile, __LINE__);2181 free((CHAR *)mp2); 2182 2182 return MRFROMLONG(hwnd); 2183 2183 } … … 2248 2248 if (apptail == info) 2249 2249 apptail = info->prev; 2250 xfree(info, pszSrcFile, __LINE__);2250 free(info); 2251 2251 break; 2252 2252 } … … 2771 2771 li->list = BuildList(hwnd); 2772 2772 if (!li->list || !li->list[0]) { 2773 xfree(li, pszSrcFile, __LINE__);2773 free(li); 2774 2774 # ifdef FORTIFY 2775 2775 Fortify_LeaveScope(); … … 2942 2942 while (info) { 2943 2943 next = info->next; 2944 xfree(info, pszSrcFile, __LINE__);2944 free(info); 2945 2945 info = next; 2946 2946 } … … 3083 3083 IDS_WINCREATEWINDOW); 3084 3084 PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID); 3085 xfree(dcd, pszSrcFile, __LINE__);3085 free(dcd); 3086 3086 # ifdef FORTIFY 3087 3087 Fortify_LeaveScope(); -
trunk/dll/undel.c
r1038 r1039 228 228 Runtime_Error(pszSrcFile, __LINE__, 229 229 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 230 xfree(undelinfo, pszSrcFile, __LINE__);230 free(undelinfo); 231 231 listdone = TRUE; 232 232 WinDismissDlg(hwnd, 0); -
trunk/dll/update.c
r1017 r1039 36 36 #include "dircnrs.h" 37 37 #include "fm3dll.h" 38 #include "fortify.h" 38 39 39 40 static PSZ pszSrcFile = __FILE__; … … 643 644 PostMsg(hwndCnr, UM_RESCAN, MPVOID, MPVOID); 644 645 if (pciList) { 645 xfree(pciList, pszSrcFile, __LINE__);646 free(pciList); 646 647 DosPostEventSem(CompactSem); 647 648 } -
trunk/dll/viewer.c
r1036 r1039 1257 1257 } 1258 1258 } 1259 xfree(vw, pszSrcFile, __LINE__);1259 free(vw); 1260 1260 } 1261 1261 if (!dontclose && -
trunk/dll/viewinf.c
r1029 r1039 162 162 p = strtok(NULL, ";"); 163 163 } 164 xfree(holdenv, pszSrcFile, __LINE__);164 free(holdenv); 165 165 NoEnv: 166 166 if (WinIsWindow(hab2, hwnd) && !repeating) { … … 178 178 Win_Error(hwnd, hwnd, pszSrcFile, __LINE__, 179 179 "PrfQueryProfileData"); 180 xfree(holdenv, pszSrcFile, __LINE__);180 free(holdenv); 181 181 } 182 182 else … … 193 193 WinTerminate(hab2); 194 194 } 195 xfree(dummy, pszSrcFile, __LINE__);195 free(dummy); 196 196 # ifdef FORTIFY 197 197 Fortify_LeaveScope(); … … 274 274 Runtime_Error(pszSrcFile, __LINE__, 275 275 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 276 xfree(d, pszSrcFile, __LINE__);276 free(d); 277 277 WinDismissDlg(hwnd, 0); 278 278 return 0; -
trunk/dll/walkem.c
r1034 r1039 49 49 #include "notebook.h" // targetdirectory 50 50 #include "fm3dll.h" 51 #include "fortify.h" 51 52 52 53 #pragma data_seg(DATA1) … … 129 130 pFirstSetup = pld->next; 130 131 xfree(pld->path, pszSrcFile, __LINE__); 131 xfree(pld, pszSrcFile, __LINE__);132 free(pld); 132 133 } 133 134 return 1; // Found or added … … 143 144 pld->path = xstrdup(name, pszSrcFile, __LINE__); 144 145 if (!pld->path) { 145 xfree(pld, pszSrcFile, __LINE__);146 free(pld); 146 147 return -1; 147 148 } … … 195 196 if (!PrfQueryProfileData(fmprof, FM3Str, pszLastSetups, pszBuf, &l)) { 196 197 Win_Error(HWND_DESKTOP, HWND_DESKTOP, pszSrcFile, __LINE__, "PrfQueryProfileData"); 197 xfree(pszBuf, pszSrcFile, __LINE__);198 free(pszBuf); 198 199 return; 199 200 } … … 201 202 if (ulDataBytes != l) { 202 203 Runtime_Error(pszSrcFile, __LINE__, "PrfQueryProfileData reported %u expected %u", l, ulDataBytes); 203 xfree(pszBuf, pszSrcFile, __LINE__);204 free(pszBuf); 204 205 return; 205 206 } … … 214 215 pld = xmalloc(sizeof(LINKDIRS), pszSrcFile, __LINE__); 215 216 if (!pld) { 216 xfree(pszBuf, pszSrcFile, __LINE__);217 free(pszBuf); 217 218 return; 218 219 } 219 220 pld->path = xstrdup(psz, pszSrcFile, __LINE__); 220 221 if (!pld->path) { 221 xfree(pszBuf, pszSrcFile, __LINE__);222 xfree(pld, pszSrcFile, __LINE__);222 free(pszBuf); 223 free(pld); 223 224 return; 224 225 } … … 235 236 } // while 236 237 237 xfree(pszBuf, pszSrcFile, __LINE__);238 free(pszBuf); 238 239 239 240 fSetupsLoaded = TRUE; … … 338 339 info->path = xstrdup(s, pszSrcFile, __LINE__); 339 340 if (!info->path) 340 xfree(info, pszSrcFile, __LINE__);341 free(info); 341 342 else { 342 343 info->next = NULL; … … 432 433 ldirhead = info->next; 433 434 xfree(info->path, pszSrcFile, __LINE__); 434 xfree(info, pszSrcFile, __LINE__);435 free(info); 435 436 break; 436 437 } … … 444 445 info->path = xstrdup(path, pszSrcFile, __LINE__); 445 446 if (!info->path) 446 xfree(info, pszSrcFile, __LINE__);447 free(info); 447 448 else { 448 449 info->next = NULL; … … 486 487 udirhead = info->next; 487 488 xfree(info->path, pszSrcFile, __LINE__); 488 xfree(info, pszSrcFile, __LINE__);489 free(info); 489 490 fUdirsChanged = TRUE; 490 491 return TRUE; … … 503 504 ldirhead = info->next; 504 505 xfree(info->path, pszSrcFile, __LINE__); 505 xfree(info, pszSrcFile, __LINE__);506 free(info); 506 507 return TRUE; 507 508 } … … 527 528 ldirhead = info->next; 528 529 xfree(info->path, pszSrcFile, __LINE__); 529 xfree(info, pszSrcFile, __LINE__);530 free(info); 530 531 return TRUE; 531 532 } … … 545 546 next = info->next; 546 547 xfree(info->path, pszSrcFile, __LINE__); 547 xfree(info, pszSrcFile, __LINE__);548 free(info); 548 549 info = next; 549 550 } … … 559 560 next = info->next; 560 561 xfree(info->path, pszSrcFile, __LINE__); 561 xfree(info, pszSrcFile, __LINE__);562 free(info); 562 563 info = next; 563 564 } … … 1224 1225 if (wa->changed) 1225 1226 WinSendMsg(hwnd, UM_SETUP3, MPVOID, MPVOID); 1226 xfree(wa, pszSrcFile, __LINE__);1227 free(wa); 1227 1228 WinDismissDlg(hwnd, 0); 1228 1229 break; -
trunk/dll/winlist.c
r1009 r1039 24 24 #include "fm3dlg.h" 25 25 #include "fm3dll.h" 26 #include "fortify.h" 26 27 27 28 #pragma data_seg(DATA1) … … 120 121 y++; 121 122 } 122 xfree(pswb, pszSrcFile, __LINE__);123 free(pswb); 123 124 DosPostEventSem(CompactSem); 124 125 } -
trunk/dll/worker.c
r1036 r1039 105 105 GetPString(IDS_COULDNTSTARTTHREADTEXT)); 106 106 FreeListInfo(wk->li); 107 xfree(wk, pszSrcFile, __LINE__);107 free(wk); 108 108 # ifdef FORTIFY 109 109 Fortify_LeaveScope(); … … 270 270 if (!PostMsg(Collector, 271 271 UM_COLLECTFROMFILE, MPFROMP(temp), MPVOID)) 272 xfree(temp, pszSrcFile, __LINE__);272 free(temp); 273 273 } 274 274 } … … 978 978 if (wk->li) 979 979 FreeListInfo(wk->li); 980 xfree(wk, pszSrcFile, __LINE__);980 free(wk); 981 981 # ifdef FORTIFY 982 982 Fortify_LeaveScope(); … … 1140 1140 for (x = 0; wk->li->list[x]; x++) { 1141 1141 strcpy(p, wk->li->list[x]); 1142 xfree(wk->li->list[x], pszSrcFile, __LINE__);1142 free(wk->li->list[x]); 1143 1143 wk->li->list[x] = xstrdup(szBuffer, pszSrcFile, __LINE__); 1144 1144 } … … 1320 1320 UM_LOADFILE, 1321 1321 MPFROMLONG(5 + viewtype), MPFROMP(temp))) 1322 xfree(temp, pszSrcFile, __LINE__);1322 free(temp); 1323 1323 } 1324 1324 DosSleep(1); … … 1365 1365 UM_LOADFILE, 1366 1366 MPFROMLONG(4 + viewtype), MPFROMP(temp))) 1367 xfree(temp, pszSrcFile, __LINE__);1367 free(temp); 1368 1368 } 1369 1369 DosSleep(1); … … 1643 1643 if (wk->li) 1644 1644 FreeListInfo(wk->li); 1645 xfree(wk, pszSrcFile, __LINE__);1645 free(wk); 1646 1646 # ifdef FORTIFY 1647 1647 Fortify_LeaveScope(); -
trunk/eas.c
r1011 r1039 75 75 WinTerminate(hab); 76 76 } 77 if (list) 78 xfree(list, pszSrcFile, __LINE__); 77 xfree(list, pszSrcFile, __LINE__); 79 78 return 0; 80 79 }
Note:
See TracChangeset
for help on using the changeset viewer.