diff options
-rw-r--r-- | src/trg-main-window.c | 3 | ||||
-rw-r--r-- | src/trg-torrent-model.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/trg-main-window.c b/src/trg-main-window.c index e3eb0fd..4ee9d8b 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -368,7 +368,7 @@ destroy_window(GtkWidget * w G_GNUC_UNUSED, gpointer data G_GNUC_UNUSED) gtk_main_quit(); } -static void open_props_cb(GtkWidget * w, gpointer data) +static void open_props_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) { TrgMainWindowPrivate *priv = TRG_MAIN_WINDOW_GET_PRIVATE(data); TrgTorrentPropsDialog *dialog = @@ -898,6 +898,7 @@ TRANSMISSION_MIN_SUPPORTED, version); /* * The callback for a torrent-get response. */ + static void on_torrent_get(JsonObject * response, int mode, int status, gpointer data) { diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c index c38b68e..d35e908 100644 --- a/src/trg-torrent-model.c +++ b/src/trg-torrent-model.c @@ -513,12 +513,13 @@ void trg_torrent_model_update(TrgTorrentModel * model, trg_client * tc, } else if (mode > TORRENT_GET_MODE_FIRST) { removedTorrents = get_torrents_removed(args); if (removedTorrents) { - for (li = json_array_get_elements(removedTorrents); li != NULL; - li = g_list_next(li)) { + GList *hitlist = json_array_get_elements(removedTorrents); + for (li = hitlist; li; li = g_list_next(li)) { id = json_node_get_int((JsonNode *) li->data); g_hash_table_remove(priv->ht, &id); addRemove = TRUE; } + g_list_free(hitlist); } } |