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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2021-04-08T09:36:02+02:00

core: cfg.lex - free after log message

---

Modified: src/core/cfg.lex

---

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

---

diff --git a/src/core/cfg.lex b/src/core/cfg.lex
index d36fc72b54..2b90fbb66a 100644
--- a/src/core/cfg.lex
+++ b/src/core/cfg.lex
@@ -1802,13 +1802,14 @@ static int sr_push_yy_state(char *fin, int mode)
                fp = fopen(newf, "r" );
                if ( fp==NULL )
                {
-                       pkg_free(newf);
                        if(mode==0)
                        {
                                LM_CRIT("cannot open included file: %s (%s)\n", 
fbuf, newf);
+                               pkg_free(newf);
                                return -1;
                        } else {
                                LM_DBG("importing file ignored: %s (%s)\n", 
fbuf, newf);
+                               pkg_free(newf);
                                return 0;
                        }
                }


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to