Changeset 15525
- Timestamp:
- Nov 8, 2007, 2:50:00 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r15469 r15525 551 551 552 552 psString path = psMetadataLookupStr(NULL, config->site, "PATH"); 553 psString newPath = NULL; // New path 554 // The following gymnastics with 'newPath' are required to avoid changing the pointer out from under the 555 // psMetadataItem on which 'path' sits (leading to memory corruption because it no longer points to valid 556 // memory). 553 557 if (path) { 554 psStringAppend(& path, ":%s", siteNameDir);558 psStringAppend(&newPath, "%s:%s", path, siteNameDir); 555 559 } else { 556 path = psMemIncrRefCounter(siteNameDir); 557 } 558 pmConfigSet(path); 560 newPath = psMemIncrRefCounter(siteNameDir); 561 } 559 562 psFree(siteNameDir); 563 pmConfigSet(newPath); 564 psFree(newPath); 560 565 561 566 // Next, we do a similar thing for the camera configuration file. The
Note:
See TracChangeset
for help on using the changeset viewer.
