Yeah but you would only hit that if you ran multiple system() calls simultaneously via multithreading, not sequentially in a loop like
Code:
for (i=0; i<1000; i++)
  system("ffmpeg...");
Locks and allocated memory are freed when the process exits, so this is a leak:
Code:
int main()
{
  char *foo=malloc(10000000);
  foo="";
only until this point:
Code:
  return 0;
}
Memory leaks and locked resources are only an issue when processes insist on not exiting.