kdesu: plug a memory leek in process executor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-04-10 17:10:59 +00:00
parent 01be7e289b
commit c689c26b26

View file

@ -358,6 +358,8 @@ int PtyProcess::exec(const QByteArray &command, const QList<QByteArray> &args)
argp[i] = NULL;
execv(path, const_cast<char **>(argp));
free(argp);
kError(kdesuDebugArea()) << "execv(" << path << "):" << perror;
_exit(1);
return -1; // Shut up compiler. Never reached.