Changeset 10031 for trunk/src/user32/win32wbaseprop.cpp
- Timestamp:
- Apr 23, 2003, 8:01:01 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbaseprop.cpp
r3493 r10031 1 /* $Id: win32wbaseprop.cpp,v 1. 1 2000-05-05 11:32:38sandervl Exp $ */1 /* $Id: win32wbaseprop.cpp,v 1.2 2003-04-23 18:01:00 sandervl Exp $ */ 2 2 /* 3 3 * Window properties … … 92 92 { 93 93 /* We need to create it */ 94 if (!(prop = (PROPERTY *) HeapAlloc(GetProcessHeap(), 0,sizeof(*prop) )))94 if (!(prop = (PROPERTY *)_smalloc(sizeof(*prop) ))) 95 95 { 96 96 dprintf(("setProp: malloc failed!!")); … … 99 99 if(HIWORD(str)) 100 100 { 101 if (!(prop->string = HEAP_strdupA(GetProcessHeap(), 0, str))) 101 unsigned cch = strlen(str) + 1; 102 if (!(prop->string = (LPSTR)_smalloc(cch))) 102 103 { 103 HeapFree( GetProcessHeap(), 0, prop);104 _sfree(prop); 104 105 return FALSE; 105 106 } 107 memcpy(prop->string, str, cch); 106 108 } 107 109 else prop->string = (char *)str; //atom … … 158 160 *pprop = prop->next; 159 161 if(HIWORD(prop->string)) 160 HeapFree(GetProcessHeap(), 0,prop->string);161 HeapFree( GetProcessHeap(), 0, prop);162 _sfree(prop->string); 163 _sfree(prop); 162 164 return handle; 163 165 } … … 176 178 next = prop->next; 177 179 if(HIWORD(prop->string)) 178 HeapFree(GetProcessHeap(), 0,prop->string);179 HeapFree(GetProcessHeap(), 0,prop);180 _sfree(prop->string); 181 _sfree(prop); 180 182 } 181 183 propertyList = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.