--- a/playlist.c
+++ b/playlist.c
@@ -102,10 +102,7 @@
 	if( sql_get_table(db, sql_buf, &result, &rows, NULL) != SQLITE_OK ) 
 		return -1;
 	if( !rows )
-	{
-		sqlite3_free_table(result);
-		return 0;
-	}
+		goto done;
 
 	rows++;
 	for( i=3; i<rows*3; i++ )
@@ -221,6 +218,7 @@
 		}
 		sql_exec(db, "UPDATE PLAYLISTS set FOUND = %d where ID = %lld", found, plID);
 	}
+done:
 	sqlite3_free_table(result);
 	DPRINTF(E_WARN, L_SCANNER, "Finished parsing playlists.\n");