engines/exec: Code cleanup to remove leaks
authorErwan Velu <erwanaliasr1@gmail.com>
Sun, 25 Jul 2021 22:01:18 +0000 (00:01 +0200)
committerErwan Velu <erwanaliasr1@gmail.com>
Sun, 25 Jul 2021 22:01:18 +0000 (00:01 +0200)
commit568b5ec632d91c3bc4fcd9d34a964bd76c2773e0
treeb231ea5d5ad8e2e54a7506878be5a77e33ee045a
parent65739ddf844203f4c64037e331bf67b63c2a7153
engines/exec: Code cleanup to remove leaks

As per the coverty reports, there was some issues in my code :
- Some structures were not properly freed before returning.
- Some file descriptors were not properly closed
- Testing with 'if (!int)' isn't a good way to test if the value is negative

Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
engines/exec.c