Commit b0de71f2 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

wldap32: Fix a possible memory leak (Coverity).

parent e031a0d0
...@@ -91,8 +91,12 @@ int CDECL WLDAP32_ber_flatten( WLDAP32_BerElement *ber, BERVAL **berval ) ...@@ -91,8 +91,12 @@ int CDECL WLDAP32_ber_flatten( WLDAP32_BerElement *ber, BERVAL **berval )
TRACE( "%p, %p\n", ber, berval ); TRACE( "%p, %p\n", ber, berval );
if (ber_flatten( BER(ber), &bervalU )) return WLDAP32_LBER_ERROR; if (ber_flatten( BER(ber), &bervalU )) return WLDAP32_LBER_ERROR;
if (!(bervalW = bervalUtoW( bervalU ))) return WLDAP32_LBER_ERROR;
bervalW = bervalUtoW( bervalU );
ber_bvfree( bervalU ); ber_bvfree( bervalU );
if (!bervalW)
return WLDAP32_LBER_ERROR;
*berval = bervalW; *berval = bervalW;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment