[sr-dev] git:master:563c6f69: core: cfg.lex - free after log message
Daniel-Constantin Mierla
miconda at gmail.com
Thu Apr 8 09:37:51 CEST 2021
Module: kamailio
Branch: master
Commit: 563c6f69aef22a90fc7870398fcfbd4242e33779
URL: https://github.com/kamailio/kamailio/commit/563c6f69aef22a90fc7870398fcfbd4242e33779
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
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;
}
}
More information about the sr-dev
mailing list