1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

fixed some memleaks (1 serious, 5 minor)

This commit is contained in:
dan
2002-03-01 10:03:35 +00:00
parent 1cd1f16c3c
commit efb0090f8c
3 changed files with 14 additions and 6 deletions

View File

@@ -1243,7 +1243,7 @@ UpdateDomainFile(WDDomain *domain)
{
struct stat stbuf;
char path[PATH_MAX];
WMPropList *shared_dict=NULL, *dict;
WMPropList *shared_dict, *dict;
Bool result, freeDict = False;
dict = domain->dictionary;
@@ -1253,10 +1253,13 @@ UpdateDomainFile(WDDomain *domain)
SYSCONFDIR, domain->domain_name);
if (stat(path, &stbuf) >= 0) {
shared_dict = WMReadPropListFromFile(path);
if (shared_dict && WMIsPLDictionary(shared_dict)) {
freeDict = True;
dict = WMDeepCopyPropList(domain->dictionary);
WMSubtractPLDictionaries(dict, shared_dict, True);
if (shared_dict) {
if (WMIsPLDictionary(shared_dict)) {
freeDict = True;
dict = WMDeepCopyPropList(domain->dictionary);
WMSubtractPLDictionaries(dict, shared_dict, True);
}
WMReleasePropList(shared_dict);
}
}
}