summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Rakus <rrakus@redhat.com>2012-10-10 16:26:11 +0200
committerRoman Rakus <rrakus@redhat.com>2012-10-10 16:26:11 +0200
commit16906287ddf54c76137f6a536743e1f6abb04038 (patch)
treeb477abc5c48126d4676f3ab292a497cd6210f40e /src
parent8d85b65a690e38e455ea084f35847f4adc87b843 (diff)
downloadopenlmi-providers-16906287ddf54c76137f6a536743e1f6abb04038.tar.gz
openlmi-providers-16906287ddf54c76137f6a536743e1f6abb04038.tar.xz
openlmi-providers-16906287ddf54c76137f6a536743e1f6abb04038.zip
Account: Minor change in create account method
Signed-off-by: Roman Rakus <rrakus@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/account/LMI_AccountManagementServiceProvider.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/account/LMI_AccountManagementServiceProvider.c b/src/account/LMI_AccountManagementServiceProvider.c
index dd91d1c..ff09653 100644
--- a/src/account/LMI_AccountManagementServiceProvider.c
+++ b/src/account/LMI_AccountManagementServiceProvider.c
@@ -319,18 +319,15 @@ KUint32 LMI_AccountManagementService_CreateAccount(
CMPIStatus* status)
{
/* TODO - Use embedded instance? */
-/* TODO - convert errmsg to array and don't use malloc/free */
/* TODO - password creation */
/* XXX - split to functions and/or macros */
- char *errmsg = NULL;
+ char errmsg[256];
#define FAIL(MSG, ERROR, STATUS, RETVAL)\
- errmsg = malloc(256 * sizeof(char));\
snprintf(errmsg, 256, (MSG), (ERROR));\
KSetStatus2(cb, status, STATUS, errmsg);\
KUint32_Set(&result, (RETVAL));\
- free(errmsg);
KUint32 result = KUINT32_INIT;
struct lu_context *luc = NULL;
@@ -508,7 +505,6 @@ KUint32 LMI_AccountManagementService_CreateAccount(
FAIL("Error setting ownership of homedir: %s\n", strerror(errno),
ERR_FAILED, 3);
goto clean;
- errmsg = malloc(256 * sizeof(char));
}
}