Question Details

No question body available.

Tags

c linux shell memory-leaks valgrind

Answers (1)

Accepted Answer Available
Accepted Answer
August 16, 2025 Score: 4 Rep: 234,000 Quality: High Completeness: 40%

The problem is likely because you're not freeing up all memory allocated after a call to exec fails.

If you're only ever calling fork to then call exec, then you're probably not actually interested in leaks in the child process. That being the case, you should add the --child-silent-after-fork=yes option to prevent tracing child processes.