summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-03-30 19:21:09 +0000
committerjbj <devnull@localhost>2000-03-30 19:21:09 +0000
commitf4606533e43ba1c153133096fee26b16e0360631 (patch)
tree217ed6215d10fd238d9af5070a0c85cdd80f8588 /build.c
parent353a2811a4173728aae666217dde44880654531d (diff)
downloadlibrpm-tizen-f4606533e43ba1c153133096fee26b16e0360631.tar.gz
librpm-tizen-f4606533e43ba1c153133096fee26b16e0360631.tar.bz2
librpm-tizen-f4606533e43ba1c153133096fee26b16e0360631.zip
fix: move free after error message that needs data.
CVS patchset: 3644 CVS date: 2000/03/30 19:21:09
Diffstat (limited to 'build.c')
-rw-r--r--build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.c b/build.c
index ac3fd87eb..bef977665 100644
--- a/build.c
+++ b/build.c
@@ -171,14 +171,15 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba,
sprintf(s, "%s/%s", specDir, cmd);
res = rename(tmpSpecFile, s);
xfree(specDir);
- xfree(tmpSpecFile);
if (res) {
fprintf(stderr, _("Failed to rename %s to %s: %s\n"),
tmpSpecFile, s, strerror(errno));
unlink(tmpSpecFile);
+ xfree(tmpSpecFile);
return 1;
}
+ xfree(tmpSpecFile);
/* Make the directory which contains the tarball the source
directory for this run */