tools/incdir: Fix the memory leak

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I9bf57071b5e967a3db55c7e473e84a8bad44cd2a
This commit is contained in:
Xiang Xiao 2020-07-23 18:17:20 +08:00 committed by Abdelatif Guettouche
parent 131535dfe4
commit 6be8dd420c

View file

@ -476,6 +476,11 @@ int main(int argc, char **argv, char **envp)
/* Clean up for the next pass */
if (saveresp != NULL)
{
free(saveresp);
}
if (segment != NULL)
{
free(segment);
@ -492,5 +497,7 @@ int main(int argc, char **argv, char **envp)
}
fputs(response, stdout);
free(response);
return EXIT_SUCCESS;
}