--- libaitio/src/sess.c 2013/03/19 17:02:58 1.2.2.1 +++ libaitio/src/sess.c 2013/03/19 17:06:58 1.2.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sess.c,v 1.2.2.1 2013/03/19 17:02:58 misho Exp $ +* $Id: sess.c,v 1.2.2.2 2013/03/19 17:06:58 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -730,14 +730,11 @@ sess_GetValue(sess_t * __restrict s, const char *csAtt if (!s || !csAttr || !*csAttr) return -1; if (v) { - if (!*v) { - if (!(*v = ait_allocVar())) { - io_SetErr(elwix_GetErrno(), "%s", elwix_GetError()); - return -1; - } + if (!(*v = ait_allocVar())) { + io_SetErr(elwix_GetErrno(), "%s", elwix_GetError()); + return -1; } else - AIT_FREE_VAL(*v); - AIT_INIT_VAL2(*v, string); + AIT_INIT_VAL2(*v, string); } /* allocated memory & mirrored shared memory into this */