summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2014-03-31 20:24:44 +0200
committerAmadeusz Sławiński <amade@asmblr.net>2015-09-05 15:39:10 +0000
commit1db6b4590418954037f340fc9f394554927d51c4 (patch)
treed86e7ebbc92f87ff5925e6725cc8b6343b95ce11
parent01476b764bc91c96848058f69a3d6ae095719e5e (diff)
downloadscreen-1db6b4590418954037f340fc9f394554927d51c4.tar.gz
Use-after-free
clang analyzer move it before free
-rw-r--r--src/canvas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/canvas.c b/src/canvas.c
index 9081818..9865182 100644
--- a/src/canvas.c
+++ b/src/canvas.c
@@ -763,6 +763,7 @@ RemCanvas()
debug("RemCanvas\n");
cv = D_forecv;
+ ye = cv->c_slback->c_ye;
if (cv->c_slorient == SLICE_UNKN)
return;
while (cv->c_slprev)
@@ -777,7 +778,6 @@ RemCanvas()
FreePerp(cv->c_slprev ? cv->c_slprev : cv->c_slnext);
FreePerp(cv->c_slback);
}
- ye = cv->c_slback->c_ye;
/* free canvas */
cv = D_forecv;
D_forecv = cv->c_slprev;