summaryrefslogtreecommitdiffstats
path: root/qacp.c
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2008-10-14 12:48:49 -0400
committerNathan Straz <nstraz@redhat.com>2008-10-14 12:48:49 -0400
commitf20feb5d549776321faea199c39a2dfe0dc2e699 (patch)
tree5d50b1404a2fe21a310d532729fd10188184d58b /qacp.c
parent8a27c58c9e809b7b175af7f6e91360766e20184c (diff)
downloadqarsh-f20feb5d549776321faea199c39a2dfe0dc2e699.tar.gz
qarsh-f20feb5d549776321faea199c39a2dfe0dc2e699.tar.xz
qarsh-f20feb5d549776321faea199c39a2dfe0dc2e699.zip
[qacp] Fix double-free when copying file to file
A previous commit added tmprstatp, which wasn't being checked just after it was assigned.
Diffstat (limited to 'qacp.c')
-rw-r--r--qacp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qacp.c b/qacp.c
index 0a79f1e..d91be9c 100644
--- a/qacp.c
+++ b/qacp.c
@@ -582,7 +582,7 @@ sendfiles(char **argv, int argc, int fileidx, short recursive)
tmprstatp = qacp_rstat(rdnp, &rstaterrno);
free(rdnp);
- if (rstatp) {
+ if (tmprstatp) {
/* Ok, the dir exists, i.e. rmtpath is /tmp/foo
* and the first rstat was an error. Now we know
* that /tmp exists, we leave destpath == rmtpath.