Commit b24fc9a9 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

DShow: don't leak device name.

parent f1e0a1b1
......@@ -2008,7 +2008,7 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
{
module_config_t *p_item;
bool b_audio = false;
const char *psz_device = NULL;
char *psz_device = NULL;
if( !EMPTY_STR( newval.psz_string ) )
psz_device = strdup( newval.psz_string );
......@@ -2052,12 +2052,14 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
CoUninitialize();
msg_Err( p_this, "didn't find device: %s", devicename.c_str() );
free( psz_device );
return VLC_EGENERIC;
}
/* Uninitialize OLE/COM */
CoUninitialize();
free( psz_device );
return VLC_SUCCESS;
}
......
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