Browse Source

Sanity check various jp parameters before trying to decref them

master
ckolivas 10 years ago
parent
commit
3e1cedfc74
  1. 3
      src/stratifier.c

3
src/stratifier.c

@ -3488,8 +3488,11 @@ static void ssend_process(ckpool_t *ckp, smsg_t *msg)
static void discard_json_params(json_params_t *jp) static void discard_json_params(json_params_t *jp)
{ {
if (likely(jp->method))
json_decref(jp->method); json_decref(jp->method);
if (likely(jp->params))
json_decref(jp->params); json_decref(jp->params);
if (likely(jp->id_val))
json_decref(jp->id_val); json_decref(jp->id_val);
free(jp); free(jp);
} }

Loading…
Cancel
Save