diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/account/LMI_AccountManagementServiceProvider.c | 6 |
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)); } } |