Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2017-04-28 22:01:18 +01:00
6 changed files with 51 additions and 33 deletions

View File

@ -100,12 +100,12 @@ notify_callback(struct cmdq_item *item, void *data)
if (ne->client != NULL)
server_client_unref(ne->client);
if (ne->session != NULL)
session_unref(ne->session);
session_remove_ref(ne->session, __func__);
if (ne->window != NULL)
window_remove_ref(ne->window);
window_remove_ref(ne->window, __func__);
if (ne->fs.s != NULL)
session_unref(ne->fs.s);
session_remove_ref(ne->fs.s, __func__);
free((void *)ne->name);
free(ne);
@ -135,13 +135,13 @@ notify_add(const char *name, struct cmd_find_state *fs, struct client *c,
if (c != NULL)
c->references++;
if (s != NULL)
s->references++;
session_add_ref(s, __func__);
if (w != NULL)
w->references++;
window_add_ref(w, __func__);
cmd_find_copy_state(&ne->fs, fs);
if (ne->fs.s != NULL)
ne->fs.s->references++; /* cmd_find_valid_state need session */
if (ne->fs.s != NULL) /* cmd_find_valid_state needs session */
session_add_ref(ne->fs.s, __func__);
new_item = cmdq_get_callback(notify_callback, ne);
cmdq_append(NULL, new_item);