coverity CID 4170: yyerror() does not return, so we proceed to de-reference

NULL. Make it return -1 instead like in other places.
This commit is contained in:
christos 2007-05-16 20:59:04 +00:00
parent 67f0e23f0f
commit dc073934fe
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cfparse.y,v 1.20 2007/03/22 10:26:19 vanhu Exp $ */
/* $NetBSD: cfparse.y,v 1.21 2007/05/16 20:59:04 christos Exp $ */
/* Id: cfparse.y,v 1.66 2006/08/22 18:17:17 manubsd Exp */
@ -1018,12 +1018,16 @@ authgroup
grouplist = racoon_realloc(icc->grouplist,
sizeof(char**)*(icc->groupcount+1));
if (grouplist == NULL)
if (grouplist == NULL) {
yyerror("unable to allocate auth group list");
return -1;
}
groupname = racoon_malloc($1->l+1);
if (groupname == NULL)
if (groupname == NULL) {
yyerror("unable to allocate auth group name");
return -1;
}
memcpy(groupname,$1->v,$1->l);
groupname[$1->l]=0;