summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-05-30 12:38:13 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-05-30 12:38:13 +0300
commite4203f1a63cc1757c5c3c9d4f63a45f098b29544 (patch)
tree3dd282ca3d9a84b396b4e8e5f2f00a938938b34b
parent11a7d407954965a27223ecc0974d7eba59d524e4 (diff)
downloadlibrpm-tizen-e4203f1a63cc1757c5c3c9d4f63a45f098b29544.tar.gz
librpm-tizen-e4203f1a63cc1757c5c3c9d4f63a45f098b29544.tar.bz2
librpm-tizen-e4203f1a63cc1757c5c3c9d4f63a45f098b29544.zip
Eliminate dead assignment(s) on rpmfsFree(), memset() wipeout instead
-rw-r--r--lib/rpmfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/rpmfs.c b/lib/rpmfs.c
index a8b1b5bed..00f55d02a 100644
--- a/lib/rpmfs.c
+++ b/lib/rpmfs.c
@@ -35,10 +35,11 @@ rpmfs rpmfsNew(Header h, rpmElementType type)
rpmfs rpmfsFree(rpmfs fs)
{
if (fs != NULL) {
- fs->replaced = _free(fs->replaced);
- fs->states = _free(fs->states);
- fs->actions = _free(fs->actions);
- fs = _free(fs);
+ free(fs->replaced);
+ free(fs->states);
+ free(fs->actions);
+ memset(fs, 0, sizeof(*fs)); /* trash and burn */
+ free(fs);
}
return NULL;
}