git.annexia.org
/
hivex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fc8bc9
)
maint: remove unnecessary test-before-free
author
Jim Meyering
<meyering@redhat.com>
Tue, 28 Jun 2011 18:09:45 +0000
(20:09 +0200)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 28 Jun 2011 22:30:12 +0000
(23:30 +0100)
* lib/hivex.c (hivex_node_set_value): Remove unnecessary
test-before-free.
lib/hivex.c
patch
|
blob
|
history
diff --git
a/lib/hivex.c
b/lib/hivex.c
index
d042f4f
..
a72fa77
100644
(file)
--- 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);
}