json parser handle cleanup

This commit is contained in:
Ephraim Vider 2016-08-28 17:58:59 +03:00 committed by Felipe Zimmerle
parent 923c3c6793
commit 21a63cb83e
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -306,10 +306,14 @@ int json_complete(modsec_rec *msr, char **error_msg) {
}
/**
* Frees the resources used for XML parsing.
* Frees the resources used for JSON parsing.
*/
apr_status_t json_cleanup(modsec_rec *msr) {
msr_log(msr, 4, "JSON: Cleaning up JSON results");
if (msr->json->handle != NULL) {
yajl_free(msr->json->handle);
msr->json->handle = NULL;
}
return 1;
}