Fix a memory leak in my_searchenv2().

This commit is contained in:
Olaf Seibert
2021-11-14 18:47:56 +01:00
parent e1962af99e
commit 5098927591

5
util.c
View File

@@ -246,9 +246,14 @@ static void my_searchenv2(
zero-delimited. */
strncpy(hitfile, concat, hitlen - 1);
hitfile[hitlen - 1] = 0;
free(envcopy);
free(concat);
return;
}
free(concat);
envcopy2 = NULL;
}