Changeset 959
- Timestamp:
- Feb 18, 2008, 1:47:31 AM (18 years ago)
- Location:
- trunk/dll
- Files:
-
- 14 edited
-
arccnrs.c (modified) (1 diff)
-
assoc.c (modified) (7 diffs)
-
autoview.c (modified) (1 diff)
-
avv.c (modified) (1 diff)
-
command.c (modified) (6 diffs)
-
common.c (modified) (1 diff)
-
comp.c (modified) (1 diff)
-
copyf.c (modified) (2 diffs)
-
datamin.c (modified) (1 diff)
-
dirsize.c (modified) (1 diff)
-
draglist.c (modified) (2 diffs)
-
literal.c (modified) (1 diff)
-
misc.c (modified) (1 diff)
-
notebook.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.c
r953 r959 1335 1335 } 1336 1336 } 1337 if (mp2) 1338 free((CHAR *) mp2); 1337 xfree((CHAR *) mp2); 1339 1338 PostMsg(pdt->hwndClient, DM_RENDERCOMPLETE, MPFROMP(pdt), 1340 1339 MPFROM2SHORT(usRes, 0)); -
trunk/dll/assoc.c
r927 r959 117 117 while (info) { 118 118 next = info->next; 119 free(info->mask); 120 free(info->cl); 121 if (info->sig) 122 free(info->sig); 123 free(info); 119 xfree(info->mask); 120 xfree(info->cl); 121 xfree(info->sig); 122 xfree(info); 124 123 info = next; 125 124 } … … 177 176 info->flags = atol(flags); 178 177 if (!info->cl || !info->mask) { 179 if (info->cl) 180 free(info->cl); 181 if (info->mask) 182 free(info->mask); 183 free(info); 178 xfree(info->cl); 179 xfree(info->mask); 180 xfree(info); 184 181 break; 185 182 } … … 272 269 info->flags = addme->flags; 273 270 if (!info->cl || !info->mask) { 274 if (info->cl) 275 free(info->cl); 276 if (info->mask) 277 free(info->mask); 278 free(info); 271 xfree(info->cl); 272 xfree(info->mask); 273 xfree(info); 279 274 } 280 275 else { … … 320 315 asstail = info->prev; 321 316 } 322 free(info->cl); 323 free(info->mask); 324 if (info->sig) 325 free(info->sig); 326 free(info); 317 xfree(info->cl); 318 xfree(info->mask); 319 xfree(info->sig); 320 xfree(info); 327 321 return TRUE; 328 322 } … … 646 640 } 647 641 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 642 if (!pszWorkBuf) 643 break; //already complained 648 644 memset(&temp, 0, sizeof(ASSOC)); 649 645 WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask); … … 735 731 736 732 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 733 if (!pszWorkBuf) 734 break; //already complained 737 735 memset(&temp, 0, sizeof(ASSOC)); 738 736 WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask); … … 850 848 MPFROMSHORT(LIT_CURSOR), MPVOID); 851 849 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 850 if (!pszWorkBuf) 851 break; //already complained 852 852 memset(&temp, 0, sizeof(ASSOC)); 853 853 WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask); -
trunk/dll/autoview.c
r907 r959 892 892 stopflag++; 893 893 if (!PostMsg(hwndAutoObj, msg, mp1, mp2)) { 894 if (mp1) 895 free((CHAR *) mp1); 894 xfree((CHAR *) mp1); 896 895 } 897 896 return 0; -
trunk/dll/avv.c
r931 r959 100 100 PSZ pszWorkBuf; 101 101 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 102 NormalizeCmdLine(pszWorkBuf, szCmdLine); 103 pszDest = xstrdup(szCmdLine, pszSrcFile, __LINE__); 104 xfree(pszWorkBuf); 102 if (pszWorkBuf) { 103 NormalizeCmdLine(pszWorkBuf, szCmdLine); 104 pszDest = xstrdup(pszWorkBuf, pszSrcFile, __LINE__); 105 xfree(pszWorkBuf); 106 } 107 else 108 pszDest = xstrdup(szCmdLine, pszSrcFile, __LINE__); // return the unexamined input on failure 105 109 } 106 110 else -
trunk/dll/command.c
r927 r959 305 305 while (info) { 306 306 next = info->next; 307 free(info->title);308 free(info->cl);307 xfree(info->title); 308 xfree(info->cl); 309 309 free(info); 310 310 info = next; … … 353 353 info->flags = atol(flags); 354 354 if (!info->cl || !info->title) { 355 if (info->cl) 356 free(info->cl); 357 if (info->title) 358 free(info->title); 355 xfree(info->cl); 356 xfree(info->title); 359 357 free(info); 360 358 break; … … 459 457 cmdtail = info->prev; 460 458 } 461 free(info->cl);462 free(info->title);459 xfree(info->cl); 460 xfree(info->title); 463 461 free(info); 464 462 return TRUE; … … 625 623 626 624 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 625 if (!pszWorkBuf) 626 break; //already complained 627 627 memset(&temp, 0, sizeof(COMMAND)); 628 628 WinQueryDlgItemText(hwnd, CMD_CL, sizeof(temp.cl), temp.cl); … … 721 721 722 722 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 723 if (!pszWorkBuf) 724 break; //already complained 723 725 memset(&temp, 0, sizeof(COMMAND)); 724 726 WinQueryDlgItemText(hwnd, CMD_CL, sizeof(temp.cl), temp.cl); … … 823 825 824 826 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 827 if (!pszWorkBuf) 828 break; //already complained 825 829 memset(&temp, 0, sizeof(COMMAND)); 826 830 WinQueryDlgItemText(hwnd, CMD_CL, sizeof(temp.cl), temp.cl); -
trunk/dll/common.c
r948 r959 586 586 if (!PostMsg((fComments) ? hwndAutoMLE : hwndAutoview, 587 587 UM_LOADFILE, MPFROMP(s), MPVOID)) { 588 if (s) 589 free(s); 588 xfree(s); 590 589 } 591 590 } -
trunk/dll/comp.c
r938 r959 102 102 if (mask) { 103 103 BldFullPathName(mask, path, "*"); 104 // sprintf(mask,105 // "%s%s*",106 // path, (path[strlen(path) - 1] != '\\') ? "\\" : NullStr);107 104 enddir = strrchr(mask, '\\'); 108 105 enddir++; -
trunk/dll/copyf.c
r907 r959 783 783 } 784 784 785 free(f);786 free(ss);785 xfree(f); 786 xfree(ss); 787 787 free(str); 788 788 return 0; … … 856 856 } 857 857 858 free(f);859 free(ss);858 xfree(f); 859 xfree(ss); 860 860 free(str); 861 861 return 0; -
trunk/dll/datamin.c
r907 r959 66 66 { 67 67 PVOID pv = xmalloc(sizeof(tDataMin), pszSrcFile, __LINE__); 68 69 WinSetWindowPtr(hwnd, QWL_DATAMIN_PTR, pv);68 if (pv) 69 WinSetWindowPtr(hwnd, QWL_DATAMIN_PTR, pv); 70 70 } 71 71 break; -
trunk/dll/dirsize.c
r920 r959 147 147 * requesting EASIZE. sheesh. 148 148 */ 149 if (((!rc || rc == ERROR_NO_MORE_FILES) && (pffbArray->attrFile & FILE_DIRECTORY)) || strlen(pszFileName) < 4) { 149 if (((!rc || rc == ERROR_NO_MORE_FILES) && (pffbArray->attrFile & FILE_DIRECTORY)) || 150 strlen(pszFileName) < 4) { 150 151 if (*pchStopFlag) { 151 152 free(pffbArray); -
trunk/dll/draglist.c
r907 r959 722 722 _heap_check(); 723 723 #endif 724 free(ppDItem);724 xfree(ppDItem); 725 725 ppDItem = NULL; // Remember gone 726 726 DosPostEventSem(CompactSem); … … 746 746 } 747 747 } 748 if (ppDItem) 749 free(ppDItem); 750 if (paDImgIcons) 751 free(paDImgIcons); 748 xfree(ppDItem); 749 xfree(paDImgIcons); 752 750 return hDrop; 753 751 } -
trunk/dll/literal.c
r907 r959 94 94 cBufBytes = strlen(pszBuf) + 1; 95 95 pszWork = pszOut = xmalloc(cBufBytes + 1, pszSrcFile, __LINE__); 96 if (!pszWork) 97 return 0; 96 98 97 99 iBuf = 0; /* set index to first character */ -
trunk/dll/misc.c
r945 r959 734 734 pci->pszSubject = xrealloc(pci->pszSubject, retlen + 1, pszSrcFile, __LINE__); 735 735 } 736 else 736 else { 737 737 pci->pszSubject = xmalloc(retlen + 1, pszSrcFile, __LINE__); 738 if (!pci->pszSubject) 739 return FALSE; 740 } 738 741 len = strlen(szSubject); 739 742 if (len) -
trunk/dll/notebook.c
r953 r959 203 203 204 204 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 205 if (!pszWorkBuf) 206 return 0; //already complained 205 207 WinQueryDlgItemText(hwnd, CFGA_VIRUS, MAXCOMLINESTRG, szCLBuf); 206 208 szCLBuf[MAXCOMLINESTRG - 1] = 0; … … 468 470 469 471 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 472 if (!pszWorkBuf) 473 return 0; //already complained 470 474 WinQueryDlgItemText(hwnd, CFGV_VIEWER, MAXCOMLINESTRG, szCLBuf); 471 475 szCLBuf[MAXCOMLINESTRG - 1] = 0; … … 657 661 658 662 case WM_CLOSE: 659 { // fixme these strings can be longer than CCHMAXPATH since 660 // they contain args. 663 { 661 664 CHAR szCLBuf[MAXCOMLINESTRG], szPathBuf[CCHMAXPATH]; 662 665 PSZ pszWorkBuf; 663 666 664 667 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 668 if (!pszWorkBuf) 669 return 0; //already complained 665 670 WinQueryDlgItemText(hwnd, CFGH_RUNHTTPWORKDIR, CCHMAXPATH, szPathBuf); 666 671 szPathBuf[CCHMAXPATH - 1] = 0; … … 1275 1280 1276 1281 pszWorkBuf = xmalloc(MAXCOMLINESTRG, pszSrcFile, __LINE__); 1282 if (!pszWorkBuf) 1283 return 0; //already complained 1277 1284 WinQueryDlgItemText(hwnd, CFGC_DIRCOMPARE, MAXCOMLINESTRG, szCLBuf); 1278 1285 szCLBuf[MAXCOMLINESTRG - 1] = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
