From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Tue, 25 Oct 2011 14:08:52 +0200 Subject: [Cluster-devel] [PATCH 01/19] libccs: check return code consistently In-Reply-To: <1319544550-18366-1-git-send-email-fdinitto@redhat.com> References: <1319544550-18366-1-git-send-email-fdinitto@redhat.com> Message-ID: <001a10d77c06c52981dc975cb83b436b29888af7.1319544158.git.fdinitto@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Spotted by Coverity Scan Signed-off-by: Fabio M. Di Nitto --- :100644 100644 577c74a... 703fa17... M config/libs/libccsconfdb/fullxpath.c config/libs/libccsconfdb/fullxpath.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/libs/libccsconfdb/fullxpath.c b/config/libs/libccsconfdb/fullxpath.c index 577c74a..703fa17 100644 --- a/config/libs/libccsconfdb/fullxpath.c +++ b/config/libs/libccsconfdb/fullxpath.c @@ -326,6 +326,11 @@ char *_ccs_get_fullxpath(confdb_handle_t handle, hdb_handle_t connection_handle, } } + if (list) + if (set_previous_query(handle, connection_handle, + (char *)query, OBJECT_PARENT_HANDLE)) + goto fail; + rtn = malloc(size); if (!rtn) { @@ -342,10 +347,6 @@ char *_ccs_get_fullxpath(confdb_handle_t handle, hdb_handle_t connection_handle, node->children ? node->children-> content : node->name); - if (list) - set_previous_query(handle, connection_handle, - (char *)query, OBJECT_PARENT_HANDLE); - } else errno = EINVAL; -- 1.7.4.4