Fix a PROF_ALLOC_PREP() error path.

Fix a PROF_ALLOC_PREP() error path to initialize the return value to
NULL.
This commit is contained in:
Jason Evans
2012-04-25 13:13:44 -07:00
parent 6b9ed67b4b
commit 3fb50b0407
2 changed files with 7 additions and 3 deletions

View File

@@ -227,8 +227,10 @@ bool prof_boot2(void);
assert(size == s2u(size)); \
\
prof_tdata = prof_tdata_get(); \
if (prof_tdata == NULL) \
if (prof_tdata == NULL) { \
ret = NULL; \
break; \
} \
\
if (opt_prof_active == false) { \
/* Sampling is currently inactive, so avoid sampling. */\