summaryrefslogtreecommitdiff
path: root/lib/headerfmt.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2017-05-26 12:40:36 +0300
committerPanu Matilainen <pmatilai@redhat.com>2017-05-26 12:40:36 +0300
commit95f4e6c6d664302bfe660a073794d3597a7e2e2f (patch)
tree338251834eb38fd21814a65da5d5ccba853b0bf8 /lib/headerfmt.c
parentd137a7b8c5fd54c002f79bd7730b5337465c2e0e (diff)
downloadrpm-95f4e6c6d664302bfe660a073794d3597a7e2e2f.tar.gz
Eliminate now unnecessary rpmtdFreeData() calls
Diffstat (limited to 'lib/headerfmt.c')
-rw-r--r--lib/headerfmt.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c
index 51e27868d..fdd842c60 100644
--- a/lib/headerfmt.c
+++ b/lib/headerfmt.c
@@ -845,13 +845,6 @@ static unsigned int tagId(rpmTagVal tag)
return tag;
}
-static rpmtd tagFree(rpmtd td)
-{
- rpmtdFreeData(td);
- rpmtdFree(td);
- return NULL;
-}
-
char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg)
{
struct headerSprintfArgs_s hsa;
@@ -869,7 +862,7 @@ char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg)
if (parseFormat(&hsa, hsa.fmt, &hsa.format, &hsa.numTokens, NULL, PARSER_BEGIN))
goto exit;
- hsa.cache = tagCacheCreate(128, tagId, tagCmp, NULL, tagFree);
+ hsa.cache = tagCacheCreate(128, tagId, tagCmp, NULL, rpmtdFree);
hsa.val = xstrdup("");
tag =