summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-join.c
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-04-29 13:15:39 +0200
committerRob Crittenden <rcritten@redhat.com>2011-05-09 16:23:40 -0400
commit16d1db499676ec7070becbb73fdf73d1af5645b3 (patch)
treed245a2a26d393cdc6e9087e6134d070b46539f94 /ipa-client/ipa-join.c
parentd3f74d2b7cee01001e6ede2ba59dcb34522b59cf (diff)
downloadfreeipa-16d1db499676ec7070becbb73fdf73d1af5645b3.tar.gz
freeipa-16d1db499676ec7070becbb73fdf73d1af5645b3.tar.xz
freeipa-16d1db499676ec7070becbb73fdf73d1af5645b3.zip
Fix issues found by Coverity.
tickets 1166, 1167, 1168, 1169
Diffstat (limited to 'ipa-client/ipa-join.c')
-rw-r--r--ipa-client/ipa-join.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipa-client/ipa-join.c b/ipa-client/ipa-join.c
index b66c4299a..21c087b68 100644
--- a/ipa-client/ipa-join.c
+++ b/ipa-client/ipa-join.c
@@ -139,6 +139,10 @@ callRPC(xmlrpc_env * const envP,
XMLRPC_ASSERT(xmlrpc_value_type(paramArrayP) == XMLRPC_TYPE_ARRAY);
curlXportParmsP = malloc(sizeof(*curlXportParmsP));
+ if (curlXportParmsP == NULL) {
+ xmlrpc_env_set_fault(envP, XMLRPC_INTERNAL_ERROR, _("Out of memory!"));
+ return;
+ }
memset(curlXportParmsP, 0, sizeof(*curlXportParmsP));
/* Have curl do SSL certificate validation */
@@ -930,7 +934,7 @@ join(const char *server, const char *hostname, const char *bindpw, const char *k
rval = 5;
goto cleanup;
}
-
+
krberr = krb5_cc_get_principal(krbctx, ccache, &uprinc);
if (krberr) {
fprintf(stderr, _("Unable to join host: Kerberos User Principal "