Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
73d0e7fd
Commit
73d0e7fd
authored
Jul 19, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: Fix a number of memory leaks.
parent
97e5728d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
record.c
dlls/dnsapi/record.c
+5
-2
record.c
dlls/dnsapi/tests/record.c
+8
-0
No files found.
dlls/dnsapi/record.c
View file @
73d0e7fd
...
...
@@ -680,7 +680,7 @@ BOOL WINAPI DnsRecordSetCompare( PDNS_RECORD set1, PDNS_RECORD set2,
DNS_RRSET_ADD
(
rr1
,
u
);
ret
=
FALSE
;
}
else
heap_free
(
u
);
else
DnsRecordListFree
(
u
,
DnsFreeRecordList
);
}
}
...
...
@@ -696,7 +696,7 @@ BOOL WINAPI DnsRecordSetCompare( PDNS_RECORD set1, PDNS_RECORD set2,
DNS_RRSET_ADD
(
rr2
,
u
);
ret
=
FALSE
;
}
else
heap_free
(
u
);
else
DnsRecordListFree
(
u
,
DnsFreeRecordList
);
}
}
...
...
@@ -704,7 +704,10 @@ BOOL WINAPI DnsRecordSetCompare( PDNS_RECORD set1, PDNS_RECORD set2,
DNS_RRSET_TERMINATE
(
rr2
);
if
(
diff1
)
*
diff1
=
rr1
.
pFirstRR
;
else
DnsRecordListFree
(
rr1
.
pFirstRR
,
DnsFreeRecordList
);
if
(
diff2
)
*
diff2
=
rr2
.
pFirstRR
;
else
DnsRecordListFree
(
rr2
.
pFirstRR
,
DnsFreeRecordList
);
return
ret
;
...
...
dlls/dnsapi/tests/record.c
View file @
73d0e7fd
...
...
@@ -89,9 +89,11 @@ static void test_DnsRecordSetCompare( void )
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
NULL
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
diff1
!=
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
DnsRecordListFree
(
diff1
,
DnsFreeRecordList
);
ok
(
DnsRecordSetCompare
(
NULL
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
diff1
==
NULL
&&
diff2
!=
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
DnsRecordListFree
(
diff2
,
DnsFreeRecordList
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
NULL
,
&
diff2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
diff2
==
NULL
,
"unexpected result: %p
\n
"
,
diff2
);
...
...
@@ -105,8 +107,14 @@ static void test_DnsRecordSetCompare( void )
r2
.
Data
.
A
.
IpAddress
=
0
;
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
NULL
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
DnsRecordListFree
(
diff2
,
DnsFreeRecordList
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
DnsRecordListFree
(
diff1
,
DnsFreeRecordList
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
DnsRecordListFree
(
diff1
,
DnsFreeRecordList
);
DnsRecordListFree
(
diff2
,
DnsFreeRecordList
);
}
static
void
test_DnsRecordSetDetach
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment