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:
Stefan Weil 2016-10-24 13:25:45 +02:00
parent 37f568dcbd
commit c12757b53e

View File

@ -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
}