diff --git a/src/common/forward.c b/src/common/forward.c index 74a8a502a104f584df617aabdf16ab940fa991ec..a31ecb196a086feb4654a0dd5fa87d02083a17d8 100644 --- a/src/common/forward.c +++ b/src/common/forward.c @@ -16,7 +16,7 @@ * any later version. * * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under + * to link the code of portions of this program with the OpenSSL library under * certain conditions as described in each individual source file, and * distribute linked combinations including the two. You must obey the GNU * General Public License in all respects for all of the code used other than diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index 69a1c522755409630e33adba39dedc2d5fbc6cf7..1f983ada39ebdf74f4a006e37399f0532bafdf63 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -1214,7 +1214,6 @@ total_return: msg->data = NULL; error("slurm_receive_and_forward_msgs: %s", slurm_strerror(rc)); - rc = -1; } else { rc = 0; } @@ -2192,6 +2191,9 @@ extern void slurm_free_msg(slurm_msg_t * msg) { if(msg->auth_cred) (void) g_slurm_auth_destroy(msg->auth_cred); + /* make sure we have all the ones we sent to so we don't worry + about freing something that may be written to later */ + forward_wait(msg); if(msg->ret_list) { list_destroy(msg->ret_list); msg->ret_list = NULL;