diff options
author | Jim Meyering <meyering@redhat.com> | 2011-06-28 20:09:45 +0200 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-06-28 23:30:12 +0100 |
commit | 6780483c3c00913e718a6134e12d82665e9ce0a6 (patch) | |
tree | 1734ec227eafd6f4cf5509eb5fdf8187f27563c3 | |
parent | 5fc8bc9d9ef6dd23d55771c8def7c369f32e7919 (diff) | |
download | hivex-6780483c3c00913e718a6134e12d82665e9ce0a6.tar.gz hivex-6780483c3c00913e718a6134e12d82665e9ce0a6.tar.xz hivex-6780483c3c00913e718a6134e12d82665e9ce0a6.zip |
maint: remove unnecessary test-before-free
* lib/hivex.c (hivex_node_set_value): Remove unnecessary
test-before-free.
-rw-r--r-- | lib/hivex.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/hivex.c b/lib/hivex.c index d042f4f..a72fa77 100644 --- a/lib/hivex.c +++ b/lib/hivex.c @@ -2748,8 +2748,7 @@ hivex_node_set_value (hive_h *h, hive_node_h node, leave_partial: for (int i = 0; i < alloc_ct; i += 2) { - if (values[i / 2].value != NULL) - free (values[i / 2].value); + free (values[i / 2].value); if (i + 1 < alloc_ct && values[i / 2].key != NULL) free (values[i / 2].key); } |