diff --git a/src/slave.c b/src/slave.c index 03cab6d7..e127cb64 100644 --- a/src/slave.c +++ b/src/slave.c @@ -64,8 +64,8 @@ static void *_slave_thread(void *arg); static thread_type *_slave_thread_id; static int slave_running = 0; static int update_settings = 0; -volatile static unsigned int max_interval = 0; -volatile static int rescan_relays = 0; +static volatile unsigned int max_interval = 0; +static volatile int rescan_relays = 0; relay_server *relay_free (relay_server *relay) { diff --git a/src/source.c b/src/source.c index 2f5492cd..a0ab569e 100644 --- a/src/source.c +++ b/src/source.c @@ -1214,8 +1214,8 @@ void source_client_callback (client_t *client, void *arg) global_lock(); global.sources--; global_unlock(); + source_clear_source (source); source_free_source (source); - client_destroy (client); return; } client->refbuf = old_data->associated; @@ -1319,6 +1319,7 @@ static void *source_fallback_file (void *arg) if (connection_complete_source (source, 0) < 0) break; source_client_thread (source); + httpp_destroy (parser); } while (0); if (file) fclose (file);