Module: kamailio Branch: master Commit: 563c6f69aef22a90fc7870398fcfbd4242e33779 URL: https://github.com/kamailio/kamailio/commit/563c6f69aef22a90fc7870398fcfbd42...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/563c6f69aef22a90fc7870398fcfbd42... Patch: https://github.com/kamailio/kamailio/commit/563c6f69aef22a90fc7870398fcfbd42...
---
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; } }