Fix error message

This commit is contained in:
zv0n 2020-08-11 13:17:03 +02:00
parent d37449ec4c
commit 6ab022a595
3 changed files with 3 additions and 4 deletions

View File

@ -244,7 +244,7 @@ bool dbusPlaying( DBusConnection *conn, const char *player ) {
return ret; return ret;
} }
void dbusFreePlyaers( char **dbus_players ) { void dbusFreePlayers( char **dbus_players ) {
for ( char **player = dbus_players; *player; ++player ) { for ( char **player = dbus_players; *player; ++player ) {
free( *player ); free( *player );
} }

View File

@ -15,6 +15,6 @@ void dbusPrev( DBusConnection *conn, const char *player );
void dbusStop( DBusConnection *conn, const char *player ); void dbusStop( DBusConnection *conn, const char *player );
bool dbusRunning( DBusConnection *conn, const char *player ); bool dbusRunning( DBusConnection *conn, const char *player );
bool dbusPlaying( DBusConnection *conn, const char *player ); bool dbusPlaying( DBusConnection *conn, const char *player );
void dbusFreePlyaers( char **dbus_players ); void dbusFreePlayers( char **dbus_players );
#endif #endif

3
main.c
View File

@ -150,8 +150,7 @@ int main( int argc, char **argv ) {
} }
if ( sources & DBUS_FLAG ) { if ( sources & DBUS_FLAG ) {
dbusFreePlyaers( dbus_players ); dbusFreePlayers( dbus_players );
dbusDisconnect( dbus_connection );
} }
if ( sources & MPD_FLAG ) { if ( sources & MPD_FLAG ) {
mpdDisconnect( mpd_connection ); mpdDisconnect( mpd_connection );