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 | 70d108545611dbb86049d0109ef4a7ab1ef6289e (patch) | |
tree | 790c9b07d5eac35a82ae7d9f5e7b59a6243a4b2c /ace/Module.cpp | |
parent | 1c44106287219a05ddbff09df4574b90777040ae (diff) | |
download | ATCD-70d108545611dbb86049d0109ef4a7ab1ef6289e.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; } |