http://git.etherboot.org
/
people
/
mcb30
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc697ee
)
D'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh
author
Michael Brown
<mcb30@etherboot.org>
Fri, 8 Dec 2006 03:07:15 +0000
(
03:07
+0000)
committer
Michael Brown
<mcb30@etherboot.org>
Fri, 8 Dec 2006 03:07:15 +0000
(
03:07
+0000)
src/core/exec.c
patch
|
blob
|
history
diff --git
a/src/core/exec.c
b/src/core/exec.c
index
a0f0b52
..
dee8144
100644
(file)
--- a/
src/core/exec.c
+++ b/
src/core/exec.c
@@
-119,9
+119,12
@@
static int split_args ( char *args, char * argv[] ) {
* Execute the named command and arguments.
*/
int system ( const char *command ) {
- char *args
= strdup ( command )
;
+ char *args;
int argc;
-
+ int rc;
+
+ /* Obtain temporary modifiable copy of command line */
+ args = strdup ( command );
if ( ! args )
return -ENOMEM;
@@
-134,6
+137,9
@@
int system ( const char *command ) {
split_args ( args, argv );
argv[argc] = NULL;
- r
eturn
execv ( argv[0], argv );
+ r
c =
execv ( argv[0], argv );
}
+
+ free ( args );
+ return rc;
}