diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-01-04 00:06:38 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-01-04 00:06:38 +0000 |
commit | fedf87f14a545fa1b2f835090e23236e214424e3 (patch) | |
tree | 790c9b07d5eac35a82ae7d9f5e7b59a6243a4b2c /ace/Module.cpp | |
parent | 86a8787240df394667ce81e3ff8a0e4238edb137 (diff) | |
download | ATCD-fedf87f14a545fa1b2f835090e23236e214424e3.tar.gz |
foo
Diffstat (limited to 'ace/Module.cpp')
-rw-r--r-- | ace/Module.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ace/Module.cpp b/ace/Module.cpp index c0d30dc1ccf..2c03705c28e 100644 --- a/ace/Module.cpp +++ b/ace/Module.cpp @@ -98,10 +98,6 @@ ACE_Module<ACE_SYNCH_2>::open (const char *mod_name, this->reader (reader_q); this->writer (writer_q); - // Setup back pointers. - reader_q->mod_ = this; - writer_q->mod_ = this; - // Save the flags this->flags_ = flags; @@ -113,14 +109,15 @@ ACE_Module<ACE_SYNCH_2>::open (const char *mod_name, this->close_i (0, M_DELETE_READER); this->close_i (1, M_DELETE_WRITER); - // Reset back pointers. - reader_q->mod_ = 0; - writer_q->mod_ = 0; - errno = ENOMEM; return -1; } + // Setup back pointers (this must come last, after we've made sure + // there's memory allocated here. + reader_q->mod_ = this; + writer_q->mod_ = this; + return 0; } |