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
8ddb00b2
Commit
8ddb00b2
authored
Nov 26, 2012
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Nov 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix some leaks (coverity).
parent
02da0411
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
filemoniker.c
dlls/ole32/filemoniker.c
+14
-2
No files found.
dlls/ole32/filemoniker.c
View file @
8ddb00b2
...
@@ -973,10 +973,17 @@ FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** p
...
@@ -973,10 +973,17 @@ FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** p
return
nb1
;
return
nb1
;
nb2
=
FileMonikerImpl_DecomposePath
(
pathOther
,
&
stringTable2
);
nb2
=
FileMonikerImpl_DecomposePath
(
pathOther
,
&
stringTable2
);
if
(
FAILED
(
nb2
))
if
(
FAILED
(
nb2
))
{
free_stringtable
(
stringTable1
);
return
nb2
;
return
nb2
;
}
if
(
nb1
==
0
||
nb2
==
0
)
if
(
nb1
==
0
||
nb2
==
0
)
{
free_stringtable
(
stringTable1
);
free_stringtable
(
stringTable2
);
return
MK_E_NOPREFIX
;
return
MK_E_NOPREFIX
;
}
commonPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
min
(
lstrlenW
(
pathThis
),
lstrlenW
(
pathOther
))
+
1
));
commonPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
min
(
lstrlenW
(
pathThis
),
lstrlenW
(
pathOther
))
+
1
));
if
(
!
commonPath
)
if
(
!
commonPath
)
...
@@ -1136,10 +1143,15 @@ FileMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppm
...
@@ -1136,10 +1143,15 @@ FileMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppm
return
res
;
return
res
;
len1
=
FileMonikerImpl_DecomposePath
(
str1
,
&
tabStr1
);
len1
=
FileMonikerImpl_DecomposePath
(
str1
,
&
tabStr1
);
if
(
FAILED
(
len1
))
return
E_OUTOFMEMORY
;
len2
=
FileMonikerImpl_DecomposePath
(
str2
,
&
tabStr2
);
len2
=
FileMonikerImpl_DecomposePath
(
str2
,
&
tabStr2
);
if
(
FAILED
(
len1
)
||
FAILED
(
len2
))
if
(
FAILED
(
len2
))
return
E_OUTOFMEMORY
;
{
free_stringtable
(
tabStr1
);
return
E_OUTOFMEMORY
;
}
/* count the number of similar items from the begin of the two paths */
/* count the number of similar items from the begin of the two paths */
for
(
sameIdx
=
0
;
(
(
tabStr1
[
sameIdx
]
!=
NULL
)
&&
for
(
sameIdx
=
0
;
(
(
tabStr1
[
sameIdx
]
!=
NULL
)
&&
...
...
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