fix a few memory leaks

This commit is contained in:
2019-07-08 15:15:29 +02:00
parent 623649dd86
commit 8718ef85a0
3 changed files with 6 additions and 4 deletions

View File

@@ -57,8 +57,8 @@ bool ncdc_cmd_msg(ncdc_mainwindow_t n, size_t ac, wchar_t **av)
v = ncdc_textview_new();
goto_if_true(v == NULL, cleanup);
ncdc_textview_set_account(v, dc_ref(current_account));
ncdc_textview_set_channel(v, dc_ref(c));
ncdc_textview_set_account(v, current_account);
ncdc_textview_set_channel(v, c);
g_ptr_array_add(ncdc_mainwindow_views(n), dc_ref(v));
ncdc_mainwindow_switchview(n, ncdc_mainwindow_views(n)->len-1);