there can be no identifier

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@988 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-11-05 12:28:14 +00:00
parent 11bea88ef9
commit 746af0022d
1 changed files with 9 additions and 7 deletions

View File

@ -134,13 +134,15 @@ asn1f_parametrize(arg_t *arg, asn1p_expr_t *expr, asn1p_expr_t *ptype) {
* Cleanup the new expression so there is no ptype-related
* stuff hanging around.
*/
p = strdup(expr->Identifier);
if(p) {
free(nex->Identifier);
nex->Identifier = p;
} else {
asn1p_expr_free(nex);
return -1;
if(expr->Identifier) {
p = strdup(expr->Identifier);
if(p) {
free(nex->Identifier);
nex->Identifier = p;
} else {
asn1p_expr_free(nex);
return -1;
}
}
asn1p_paramlist_free(nex->params);
nex->params = NULL;