mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 11:09:06 +08:00
viewer/svutil: Fix memory leak
Coverity report: CID 1164728 (#1 of 1): Resource leak (RESOURCE_LEAK) 33. leaked_storage: Variable argv going out of scope leaks the storage it points to. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
37f568dcbd
commit
c12757b53e
@ -118,6 +118,9 @@ void SVSync::StartProcess(const char* executable, const char* args) {
|
||||
}
|
||||
argv[argc] = NULL;
|
||||
execvp(executable, argv);
|
||||
free(argv[0]);
|
||||
free(argv[1]);
|
||||
delete[] argv;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user