Browse code

core: cfg.lex - free after log message

(cherry picked from commit 563c6f69aef22a90fc7870398fcfbd4242e33779)

Daniel-Constantin Mierla authored on 08/04/2021 07:36:02
Showing 1 changed files
... ...
@@ -1645,13 +1645,14 @@ static int sr_push_yy_state(char *fin, int mode)
1645 1645
 		fp = fopen(newf, "r" );
1646 1646
 		if ( fp==NULL )
1647 1647
 		{
1648
-			pkg_free(newf);
1649 1648
 			if(mode==0)
1650 1649
 			{
1651 1650
 				LM_CRIT("cannot open included file: %s (%s)\n", fbuf, newf);
1651
+				pkg_free(newf);
1652 1652
 				return -1;
1653 1653
 			} else {
1654 1654
 				LM_DBG("importing file ignored: %s (%s)\n", fbuf, newf);
1655
+				pkg_free(newf);
1655 1656
 				return 0;
1656 1657
 			}
1657 1658
 		}