Skip to content

Commit 8c92a17

Browse files
author
Ralph Castain
committed
Minor memory leak
1 parent 1f7e2d7 commit 8c92a17

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opal/mca/pmix/pmix112/pmix/src/client/pmix_client.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
44
* Copyright (c) 2014-2015 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014 Artem Y. Polyakov <[email protected]>.
@@ -169,10 +169,14 @@ static void job_data(struct pmix_peer_t *pr, pmix_usock_hdr_t *hdr,
169169

170170
/* unpack the nspace - we don't really need it, but have to
171171
* unpack it to maintain sequence */
172-
if (PMIX_SUCCESS != (rc = pmix_bfrop.unpack(buf, &nspace, &cnt, PMIX_STRING))) {
172+
nspace = NULL;
173+
if (PMIX_SUCCESS != (rc = pmix_bfrop.unpack(buf, &nspace, &cnt, PMIX_STRING))) {
173174
PMIX_ERROR_LOG(rc);
174175
return;
175176
}
177+
if (NULL != nspace) {
178+
free(nspace);
179+
}
176180
/* decode it */
177181
pmix_client_process_nspace_blob(pmix_globals.myid.nspace, buf);
178182
cb->status = PMIX_SUCCESS;

0 commit comments

Comments
 (0)