diff options
author | Peter Johnson <peter@tortall.net> | 2006-12-30 02:45:39 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2006-12-30 02:45:39 +0000 |
commit | 60167896e20e232da33d2b635ff409850bd30daf (patch) | |
tree | c1d2edb43a39380db9715d9ff74106ae8f830bd4 /libyasm/value.c | |
parent | 5ae2b8078993793c59fb1663464b4b7c09c2b4bc (diff) | |
download | yasm-60167896e20e232da33d2b635ff409850bd30daf.tar.gz |
yasm_value_delete(): Check for NULL expr before attempting to delete it.
svn path=/trunk/yasm/; revision=1722
Diffstat (limited to 'libyasm/value.c')
-rw-r--r-- | libyasm/value.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libyasm/value.c b/libyasm/value.c index fa31f87d..5b1981c9 100644 --- a/libyasm/value.c +++ b/libyasm/value.c @@ -93,7 +93,8 @@ yasm_value_init_copy(yasm_value *value, const yasm_value *orig) void yasm_value_delete(yasm_value *value) { - yasm_expr_destroy((value)->abs); + if (value->abs) + yasm_expr_destroy(value->abs); value->abs = NULL; value->rel = NULL; } |