Permalink
Browse files

Cleanup arguments when exec fails

  • Loading branch information...
1 parent 053d25b commit de3776b82a8a160fe4a658b06dd04b71889cf459 @dbussink dbussink committed Jan 2, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 vm/builtin/system.cpp
View
2 vm/builtin/system.cpp
@@ -235,6 +235,8 @@ namespace rubinius {
// If we added anything, then exec, otherwise fall through and fail.
if(idx > 0) execvp(args[0], args);
+ // If we failed, clean up the args.
+ delete[] args;
}
}

0 comments on commit de3776b

Please sign in to comment.