summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Tourbin <alexey.tourbin@gmail.com>2018-02-23 23:08:06 +0300
committerPanu Matilainen <pmatilai@redhat.com>2018-02-26 13:50:13 +0200
commitff9a099d217fafdbbd68e4a055bc6579556a2c5b (patch)
tree7560a60cf7a9a187dfbceaf7553c1538e439ba3e
parentc14fa5e05801481d9b4bbc8bedc6a02527713f12 (diff)
downloadrpm-ff9a099d217fafdbbd68e4a055bc6579556a2c5b.tar.gz
legacy.c: Fix headerGetEntry count
rpmtdFreeData resets td.count to 0, so the whole thing never worked. Better late than never, they say.
-rw-r--r--lib/legacy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/legacy.c b/lib/legacy.c
index 8ba7bbd55..4f86e137e 100644
--- a/lib/legacy.c
+++ b/lib/legacy.c
@@ -244,12 +244,12 @@ int headerConvert(Header h, int op)
#define TDWRAP() \
if (type) \
*type = td.type; \
+ if (c) \
+ *c = td.count; \
if (p) \
*p = td.data; \
else \
- rpmtdFreeData(&td); \
- if (c) \
- *c = td.count
+ rpmtdFreeData(&td)
int headerRemoveEntry(Header h, rpm_tag_t tag)
{