Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
89f1d626
Commit
89f1d626
authored
Dec 12, 2022
by
Fabian Maurer
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Set error code in error cases (Coverity).
Signed-off-by:
Fabian Maurer
<
dark.shadow4@web.de
>
parent
0408d3a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
misc.c
dlls/wldap32/misc.c
+28
-10
No files found.
dlls/wldap32/misc.c
View file @
89f1d626
...
...
@@ -218,13 +218,19 @@ WCHAR * CDECL ldap_first_attributeW( LDAP *ld, WLDAP32_LDAPMessage *entry, WLDAP
if
(
ld
&&
entry
)
retU
=
ldap_first_attribute
(
CTX
(
ld
),
MSG
(
entry
),
&
berU
);
else
return
NULL
;
if
(
retU
&&
(
ber
=
malloc
(
sizeof
(
*
ber
)
)))
if
(
!
retU
)
return
NULL
;
if
(
!
(
ber
=
malloc
(
sizeof
(
*
ber
)
)))
{
ber
->
opaque
=
(
char
*
)
berU
;
*
ptr
=
ber
;
ret
=
strUtoW
(
retU
)
;
ld
->
ld_errno
=
WLDAP32_LDAP_NO_MEMORY
;
ldap_memfree
(
retU
)
;
ret
urn
NULL
;
}
ber
->
opaque
=
(
char
*
)
berU
;
*
ptr
=
ber
;
ret
=
strUtoW
(
retU
);
ldap_memfree
(
retU
);
return
ret
;
}
...
...
@@ -358,12 +364,18 @@ WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_next_entry( LDAP *ld, WLDAP32_LDAPMessa
if
(
entry
->
lm_next
)
return
entry
->
lm_next
;
msgU
=
ldap_next_entry
(
CTX
(
ld
),
MSG
(
entry
)
);
if
(
msgU
&&
(
msg
=
calloc
(
1
,
sizeof
(
*
msg
)
)))
if
(
!
msgU
)
return
NULL
;
if
(
!
(
msg
=
calloc
(
1
,
sizeof
(
*
msg
)
)))
{
MSG
(
msg
)
=
msgU
;
entry
->
lm_next
=
msg
;
ld
->
ld_errno
=
WLDAP32_LDAP_NO_MEMORY
;
return
NULL
;
}
MSG
(
msg
)
=
msgU
;
entry
->
lm_next
=
msg
;
return
msg
;
}
...
...
@@ -382,12 +394,18 @@ WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_next_reference( LDAP *ld, WLDAP32_LDAPM
if
(
entry
->
lm_next
)
return
entry
->
lm_next
;
msgU
=
ldap_next_reference
(
CTX
(
ld
),
MSG
(
entry
)
);
if
(
msgU
&&
(
msg
=
calloc
(
1
,
sizeof
(
*
msg
)
)))
if
(
!
msgU
)
return
NULL
;
if
(
!
(
msg
=
calloc
(
1
,
sizeof
(
*
msg
)
)))
{
MSG
(
msg
)
=
msgU
;
entry
->
lm_next
=
msg
;
ld
->
ld_errno
=
WLDAP32_LDAP_NO_MEMORY
;
return
NULL
;
}
MSG
(
msg
)
=
msgU
;
entry
->
lm_next
=
msg
;
return
msg
;
}
...
...
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