summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_bitmap32_compress.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-06-18 21:10:15 -0700
committerJay Sorg <jay.sorg@gmail.com>2014-06-18 21:10:15 -0700
commita16b83ac8a1cb97fc2b16c79c6bf96c63a26016a (patch)
tree773544114d9f5f161b3f0ccfcf10839662bfc1c7 /libxrdp/xrdp_bitmap32_compress.c
parentb61b58b1ad68ba0361e0c81b2eee823099092e04 (diff)
downloadxrdp-proprietary-a16b83ac8a1cb97fc2b16c79c6bf96c63a26016a.tar.gz
xrdp-proprietary-a16b83ac8a1cb97fc2b16c79c6bf96c63a26016a.zip
libxrdp: remove some alloc / free
Diffstat (limited to 'libxrdp/xrdp_bitmap32_compress.c')
-rw-r--r--libxrdp/xrdp_bitmap32_compress.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libxrdp/xrdp_bitmap32_compress.c b/libxrdp/xrdp_bitmap32_compress.c
index d843cff1..a1860ebe 100644
--- a/libxrdp/xrdp_bitmap32_compress.c
+++ b/libxrdp/xrdp_bitmap32_compress.c
@@ -268,6 +268,8 @@ fout(int collen, int replen, char *colptr, struct stream *s)
LLOGLN(10, ("fout: big run lreplen %d", lreplen));
replen -= lreplen;
code = ((lreplen & 0xF) << 4) | ((lreplen & 0xF0) >> 4);
+ out_uint8(s, code);
+ colptr += lreplen;
}
else
{
@@ -282,11 +284,11 @@ fout(int collen, int replen, char *colptr, struct stream *s)
lreplen = 0;
}
code = (collen << 4) | lreplen;
+ out_uint8(s, code);
+ out_uint8a(s, colptr, collen);
+ colptr += collen + lreplen;
+ collen = 0;
}
- out_uint8(s, code);
- out_uint8a(s, colptr, collen);
- colptr += collen + lreplen;
- collen = 0;
cont = replen > 0;
}
return 0;