Commit 37db19eb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add mediacontrol_exception_cleanup() consistent with mediacontrol_exception_init().

parent ac92c147
...@@ -86,7 +86,14 @@ VLC_PUBLIC_API void ...@@ -86,7 +86,14 @@ VLC_PUBLIC_API void
mediacontrol_exception_init( mediacontrol_Exception *exception ); mediacontrol_exception_init( mediacontrol_Exception *exception );
/** /**
* Free an exception structure. * Clean up an existing exception structure after use.
* \param p_exception the exception to clean up.
*/
VLC_PUBLIC_API void
mediacontrol_exception_cleanup( mediacontrol_Exception *exception );
/**
* Free an exception structure created with mediacontrol_exception_create().
* \return the exception * \return the exception
*/ */
VLC_PUBLIC_API void mediacontrol_exception_free(mediacontrol_Exception *exception); VLC_PUBLIC_API void mediacontrol_exception_free(mediacontrol_Exception *exception);
......
...@@ -281,12 +281,16 @@ mediacontrol_exception_init( mediacontrol_Exception *exception ) ...@@ -281,12 +281,16 @@ mediacontrol_exception_init( mediacontrol_Exception *exception )
} }
void void
mediacontrol_exception_free( mediacontrol_Exception *exception ) mediacontrol_exception_cleanup( mediacontrol_Exception *exception )
{ {
if( ! exception ) if( exception )
return;
free( exception->message ); free( exception->message );
}
void
mediacontrol_exception_free( mediacontrol_Exception *exception )
{
mediacontrol_exception_cleanup( exception );
free( exception ); free( exception );
} }
......
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