aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ddc/ddc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-02 08:29:58 +0000
committermarha <marha@users.sourceforge.net>2010-08-02 08:29:58 +0000
commitd2758df0a0091496717fe7a65c3e7563e7c82785 (patch)
tree5cb4f95ca29e85f6f732ef4a25e417ed5c2b8d54 /xorg-server/hw/xfree86/ddc/ddc.c
parent022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc (diff)
downloadvcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.tar.gz
vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.tar.bz2
vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.zip
xserver libX11 libXdmcp git update 2-8-2010
Diffstat (limited to 'xorg-server/hw/xfree86/ddc/ddc.c')
-rw-r--r--xorg-server/hw/xfree86/ddc/ddc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/ddc/ddc.c b/xorg-server/hw/xfree86/ddc/ddc.c
index 3b70ce508..975e07620 100644
--- a/xorg-server/hw/xfree86/ddc/ddc.c
+++ b/xorg-server/hw/xfree86/ddc/ddc.c
@@ -102,7 +102,7 @@ resort(unsigned char *s_block)
}
static int
-DDC_checksum(unsigned char *block, int len)
+DDC_checksum(const unsigned char *block, int len)
{
int i, result = 0;
int not_null = 0;
@@ -149,7 +149,10 @@ GetEDID_DDC1(unsigned int *s_ptr)
d_pos++;
}
free(s_ptr);
- if (d_block && DDC_checksum(d_block,EDID1_LEN)) return NULL;
+ if (d_block && DDC_checksum(d_block,EDID1_LEN)) {
+ free(d_block);
+ return NULL;
+ }
return (resort(d_block));
}