diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-02-22 19:11:42 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-02-22 19:11:42 +0000 |
commit | 1d3241215a241c612d2c0d9462762c64e0164423 (patch) | |
tree | 24b8cac5009b8671821c37ec9272def2ca777c74 | |
parent | 0dac179ff9575c7cea63382980814d3a85c5b0d9 (diff) | |
download | ATCD-1d3241215a241c612d2c0d9462762c64e0164423.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-98a | 7 | ||||
-rw-r--r-- | ace/Svc_Conf.y | 32 |
2 files changed, 28 insertions, 11 deletions
diff --git a/ChangeLog-98a b/ChangeLog-98a index fa587b4bd65..d28fe44cdbc 100644 --- a/ChangeLog-98a +++ b/ChangeLog-98a @@ -1,3 +1,10 @@ +Sun Feb 22 13:06:20 1998 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu> + + * ace/Svc_Conf.y: Fixed a couple of places where we were + potentially dereferencing NULL pointers when services failed to + load. Thanks to Eric C. Newton <ecn@smart.net> for reporting + this. + Sat Feb 21 12:44:51 1998 David L. Levine <levine@cs.wustl.edu> * ACE version 4.4.29, released Sat Feb 21 12:44:51 1998. diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y index 43c508b1159..6182943b096 100644 --- a/ace/Svc_Conf.y +++ b/ace/Svc_Conf.y @@ -130,23 +130,33 @@ stream_modules ; module_list - : module_list module { $2->link ($1); $$ = $2; } + : module_list module + { + if ($2 != 0) + { + $2->link ($1); + $$ = $2; + } + } | /* EMPTY */ { $$ = 0; } ; module : dynamic { - ACE_ARGV args ($<static_node_>1->parameters ()); - ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1); - - if (mt->init (args.argc (), args.argv ()) == -1 - || ((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1) - { - ACE_ERROR ((LM_ERROR, "dynamic initialization failed for Module %s\n", - $<static_node_>1->name ())); - yyerrno++; - } + if ($<static_node_>1 != 0) + { + ACE_ARGV args ($<static_node_>1->parameters ()); + ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1); + + if (mt->init (args.argc (), args.argv ()) == -1 + || ((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1) + { + ACE_ERROR ((LM_ERROR, "dynamic initialization failed for Module %s\n", + $<static_node_>1->name ())); + yyerrno++; + } + } } | static { |