tools/incdir: Fix the memory leak
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I9bf57071b5e967a3db55c7e473e84a8bad44cd2a
This commit is contained in:
parent
131535dfe4
commit
6be8dd420c
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue