]> SAFE projects GIT repository - jmp/mailleur/commitdiff
digest-md5 receiving email OK and NO memory leak
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 7 Jul 2025 08:35:24 +0000 (04:35 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 7 Jul 2025 08:35:24 +0000 (04:35 -0400)
lib/devsoc.c
lib/devsoc.h
lib/lvleml.c
lib/unisql.c

index 98aeeb38751838907e7755d2704a3f39af42b5b9..d377806cab645d594afc5138b05e69a11b2aac8a 100644 (file)
@@ -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);
index 5158b308c2d1bd49994ea837d7d5648b9b6daa88..6efd35dc23c8dbce2e36fde92c2fb12f54a01e2c 100644 (file)
@@ -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);
index 7a65919c091f58edce003b4c67d345fa24d26fd3..927f0abbecc1d5ffecd78a8931a378375e027dfe 100644 (file)
@@ -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
index ab41fc070aabde828cb7500014f403e3a8209c9c..da7f1e4cf6351d20a9aa8208327d29900286bb95 100644 (file)
@@ -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;
   }