diff options
Diffstat (limited to 'sim/common/sim-module.c')
-rw-r--r-- | sim/common/sim-module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index d686182..bb0e2d0 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -88,7 +88,8 @@ sim_pre_argv_init (SIM_DESC sd, const char *myname) for (i = 0; i < MAX_NR_PROCESSORS; ++i) { char *name; - asprintf (&name, "cpu%d", i); + if (asprintf (&name, "cpu%d", i) < 0) + return SIM_RC_FAIL; CPU_NAME (STATE_CPU (sd, i)) = name; } } |