output-json-alert: don't decref used object

In the unlikely case of a allocation error we will still use the
existing object so it should not be decref and freed.
pull/2776/head
Eric Leblond 8 years ago committed by Victor Julien
parent f4374ffd0b
commit 5be44eb500

@ -246,7 +246,6 @@ void AlertJsonHeader(const Packet *p, const PacketAlert *pa, json_t *js)
json_t *ajs = json_object();
if (ajs == NULL) {
json_decref(js);
return;
}

Loading…
Cancel
Save