diff options
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; |