Browse code

core: cfg.lex - free after log message

Daniel-Constantin Mierla authored on 08/04/2021 07:36:02
Showing 1 changed files
... ...
@@ -1802,13 +1802,14 @@ static int sr_push_yy_state(char *fin, int mode)
1802 1802
 		fp = fopen(newf, "r" );
1803 1803
 		if ( fp==NULL )
1804 1804
 		{
1805
-			pkg_free(newf);
1806 1805
 			if(mode==0)
1807 1806
 			{
1808 1807
 				LM_CRIT("cannot open included file: %s (%s)\n", fbuf, newf);
1808
+				pkg_free(newf);
1809 1809
 				return -1;
1810 1810
 			} else {
1811 1811
 				LM_DBG("importing file ignored: %s (%s)\n", fbuf, newf);
1812
+				pkg_free(newf);
1812 1813
 				return 0;
1813 1814
 			}
1814 1815
 		}