From: Jean-Marc Pigeon (Delson) Date: Mon, 7 Jul 2025 08:35:24 +0000 (-0400) Subject: digest-md5 receiving email OK and NO memory leak X-Git-Tag: tag-0.12~5 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=002cb1715be51db4d3480f067429e85a8962a3a5;p=jmp%2Fmailleur digest-md5 receiving email OK and NO memory leak --- diff --git a/lib/devsoc.c b/lib/devsoc.c index 98aeeb3..d377806 100644 --- a/lib/devsoc.c +++ b/lib/devsoc.c @@ -1573,13 +1573,13 @@ return iscrypted; /* Procedure to return all cipher information */ /* */ /********************************************************/ -PUBLIC const char *soc_getcipherid(SOCPTR *socptr) +PUBLIC char *soc_getcipherid(SOCPTR *socptr) { -const char *cipherid; +char *cipherid; SOCTYP *soc; -cipherid=(const char *)0; +cipherid=(char *)0; soc=(SOCTYP *)socptr; if (soc!=(SOCTYP *)0) cipherid=tls_getcipherid(soc->tls); diff --git a/lib/devsoc.h b/lib/devsoc.h index 5158b30..6efd35d 100644 --- a/lib/devsoc.h +++ b/lib/devsoc.h @@ -79,7 +79,7 @@ extern _Bool soc_iscrypted(SOCPTR *socptr); extern const char *soc_get_cipher_name(SOCPTR *socptr); //return all cipher information -extern const char *soc_getcipherid(SOCPTR *socptr); +extern char *soc_getcipherid(SOCPTR *socptr); //return line socket mode (cleartext, crypted) extern const char *soc_getstrmode(SOCPTR *socptr); diff --git a/lib/lvleml.c b/lib/lvleml.c index 7a65919..927f0ab 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -286,7 +286,12 @@ while (proceed==true) { break; case 2 : //Inserting TLS information if (soc_iscrypted(contact->socptr)==true) { - (void) fprintf(data,"\t(%s)\n",soc_getcipherid(contact->socptr)); + char *cipherid; + + cipherid=soc_getcipherid(contact->socptr); + if (cipherid!=(char *)0) + (void) fprintf(data,"\t(%s)\n",cipherid); + cipherid=rou_freestr(cipherid); } break; case 3 : //Inserting ID information diff --git a/lib/unisql.c b/lib/unisql.c index ab41fc0..da7f1e4 100644 --- a/lib/unisql.c +++ b/lib/unisql.c @@ -130,6 +130,7 @@ if (ses!=(SESTYP *)0) { ses->hfrom=rou_freestr(ses->hfrom); ses->sfrom=rou_freestr(ses->sfrom); ses->sessid=rou_freestr(ses->sessid); + ses->title=rou_freestr(ses->title); (void) free(ses); ses=(SESTYP *)0; }