Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
/* The name never changes, so allocate it with the structure */
if (uep == NULL) {
uep = malloc(sizeof (*uep) + (eqp-arg));
/* The name never changes, so allocate it with the structure */
if (uep == NULL) {
uep = malloc(sizeof (*uep) + (eqp-arg));
+ if (uep == NULL) {
+ novm("environment variable");
+ return 1;
+ }
strncpy(uep->ue_name, arg, eqp-arg);
uep->ue_name[eqp-arg] = '\0';
uep->ue_next = NULL;
strncpy(uep->ue_name, arg, eqp-arg);
uep->ue_name[eqp-arg] = '\0';
uep->ue_next = NULL;
/* The name never changes, so allocate it with the structure */
if (uep == NULL) {
uep = malloc(sizeof (*uep) + strlen(arg));
/* The name never changes, so allocate it with the structure */
if (uep == NULL) {
uep = malloc(sizeof (*uep) + strlen(arg));
+ if (uep == NULL) {
+ novm("environment variable");
+ return 1;
+ }
strcpy(uep->ue_name, arg);
uep->ue_next = NULL;
insp = &userenv_list;
strcpy(uep->ue_name, arg);
uep->ue_next = NULL;
insp = &userenv_list;