Module: kamailio
Branch: master
Commit: c8217350f44a9ab897e3acdffbce1eb2a57fe1a2
URL: 
https://github.com/kamailio/kamailio/commit/c8217350f44a9ab897e3acdffbce1eb2a57fe1a2

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-04-28T11:17:12+02:00

lost: clean allocated memory also for length 0

---

Modified: src/modules/lost/response.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c8217350f44a9ab897e3acdffbce1eb2a57fe1a2.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c8217350f44a9ab897e3acdffbce1eb2a57fe1a2.patch

---

diff --git a/src/modules/lost/response.c b/src/modules/lost/response.c
index 64cd55170aa..ac1728b62ab 100644
--- a/src/modules/lost/response.c
+++ b/src/modules/lost/response.c
@@ -731,10 +731,10 @@ p_lost_list_t lost_get_response_list(
 
                                                new->next = list;
                                                list = new;
-                                               lost_free_string(&tmp); /* 
clean up */
                                        } else {
                                                
lost_delete_response_list(&new); /* clean up */
                                        }
+                                       lost_free_string(&tmp); /* clean up */
                                }
                        }
                } else {

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to