Code Review
/
ric-plt
/
lib
/
rmr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix potential race in route table load
[ric-plt/lib/rmr.git]
/
src
/
rmr
/
common
/
src
/
rtc_static.c
diff --git
a/src/rmr/common/src/rtc_static.c
b/src/rmr/common/src/rtc_static.c
index
c1bad15
..
2deef8e
100644
(file)
--- a/
src/rmr/common/src/rtc_static.c
+++ b/
src/rmr/common/src/rtc_static.c
@@
-270,6
+270,11
@@
static void* rtc( void* vctx ) {
return NULL;
}
return NULL;
}
+ if( (ctx->ephash = rmr_sym_alloc( RT_SIZE )) == NULL ) { // master hash table for endpoints (each rt will reference this)
+ rmr_vlog( RMR_VL_CRIT, "rmr_rtc: internal mishap: unable to allocate an endpoint hash table\n" );
+ return NULL;
+ }
+
if( (eptr = getenv( ENV_VERBOSE_FILE )) != NULL ) {
vfd = open( eptr, O_RDONLY );
vlevel = refresh_vlevel( vfd );
if( (eptr = getenv( ENV_VERBOSE_FILE )) != NULL ) {
vfd = open( eptr, O_RDONLY );
vlevel = refresh_vlevel( vfd );