mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-22 01:17:04 +00:00
Clean remaining json object in case of error
This commit is contained in:
parent
2d3d5d8045
commit
64effa3bb9
1 changed files with 3 additions and 2 deletions
|
@ -73,6 +73,7 @@ int sslx_print_certificate(ssl,data,pf)
|
||||||
#endif
|
#endif
|
||||||
UCHAR *d;
|
UCHAR *d;
|
||||||
int _status;
|
int _status;
|
||||||
|
struct json_object *cert_obj;
|
||||||
|
|
||||||
#ifdef OPENSSL
|
#ifdef OPENSSL
|
||||||
P_(P_ASN){
|
P_(P_ASN){
|
||||||
|
@ -86,7 +87,6 @@ int sslx_print_certificate(ssl,data,pf)
|
||||||
struct json_object *jobj;
|
struct json_object *jobj;
|
||||||
jobj = ssl->cur_json_st;
|
jobj = ssl->cur_json_st;
|
||||||
|
|
||||||
struct json_object *cert_obj;
|
|
||||||
cert_obj = json_object_new_object();
|
cert_obj = json_object_new_object();
|
||||||
|
|
||||||
d=data->data;
|
d=data->data;
|
||||||
|
@ -184,6 +184,7 @@ int sslx_print_certificate(ssl,data,pf)
|
||||||
#ifdef OPENSSL
|
#ifdef OPENSSL
|
||||||
if(x) X509_free(x);
|
if(x) X509_free(x);
|
||||||
#endif
|
#endif
|
||||||
|
if(cert_obj) json_object_put(cert_obj);
|
||||||
return(_status);
|
return(_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue