diff options
author | Lev Walkin <vlm@lionet.info> | 2005-11-05 12:28:14 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-11-05 12:28:14 +0000 |
commit | d594771c15b1a252140fef0500109c02bdefbe0c (patch) | |
tree | db87874fa89233237efb5caabdc429e2b4b46dff /libasn1fix/asn1fix_param.c | |
parent | a895afba67a27db3caf3ac3b772ba1696b161afd (diff) |
there can be no identifier
Diffstat (limited to 'libasn1fix/asn1fix_param.c')
-rw-r--r-- | libasn1fix/asn1fix_param.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libasn1fix/asn1fix_param.c b/libasn1fix/asn1fix_param.c index 159dbbc2..a4d96902 100644 --- a/libasn1fix/asn1fix_param.c +++ b/libasn1fix/asn1fix_param.c @@ -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; |