Browse Source

Handle null message.

master
Con Kolivas 7 years ago
parent
commit
11f39326a8
  1. 5
      src/stratifier.c

5
src/stratifier.c

@ -3307,7 +3307,7 @@ static void _dec_instance_ref(sdata_t *sdata, stratum_instance_t *client, const
{ {
char_entry_t *entries = NULL; char_entry_t *entries = NULL;
bool dropped = false; bool dropped = false;
char *msg; char *msg = NULL;
int ref; int ref;
ck_wlock(&sdata->instance_lock); ck_wlock(&sdata->instance_lock);
@ -3317,7 +3317,8 @@ static void _dec_instance_ref(sdata_t *sdata, stratum_instance_t *client, const
if (unlikely(client->dropped && !ref)) { if (unlikely(client->dropped && !ref)) {
dropped = true; dropped = true;
__drop_client(sdata, client, true, &msg); __drop_client(sdata, client, true, &msg);
add_msg_entry(&entries, &msg); if (msg)
add_msg_entry(&entries, &msg);
} }
ck_wunlock(&sdata->instance_lock); ck_wunlock(&sdata->instance_lock);

Loading…
Cancel
Save