summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-12 13:49:50 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-11-25 08:58:26 +0200
commitb2751f801c1830d1d8287050048f924ac193a211 (patch)
tree1fa8301e34b22b3d47eefd227f178eb4c9051ca5
parente213c7b6e1ab0c3a284ed99756bda828f0c3a4c0 (diff)
downloadrpm-b2751f801c1830d1d8287050048f924ac193a211.tar.gz
Fix format extension memleak on empty strings
(cherry picked from commit bc716457e042e12f4e90efdabafe2cd69d3bff52)
-rw-r--r--lib/headerfmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/headerfmt.c b/lib/headerfmt.c
index d3956585e..004a6a3d8 100644
--- a/lib/headerfmt.c
+++ b/lib/headerfmt.c
@@ -655,8 +655,8 @@ static char * formatValue(headerSprintfArgs hsa, sprintfTag tag, int element)
t = hsaReserve(hsa, need);
te = stpcpy(t, val);
hsa->vallen += (te - t);
- val = _free(val);
}
+ free(val);
return (hsa->val + hsa->vallen);
}