Permalink
Browse files

Fix brown paper bag bug

  • Loading branch information...
thjaeger committed Apr 13, 2010
1 parent f266bf5 commit 43453fef913c5ef2dad44927717ffe9a90062cd2
Showing with 3 additions and 2 deletions.
  1. +3 −2 wacomrotate.c
View
@@ -38,7 +38,7 @@ int opcode;
void rotate_device(int dev) {
Atom prop, type;
int format;
- unsigned char* data;
+ unsigned char* data = NULL;
unsigned long nitems, bytes_after;
XDevice fake_dev;
fake_dev.device_id = dev;
@@ -56,13 +56,14 @@ void rotate_device(int dev) {
*data = wacom_rotation;
XChangeDeviceProperty(dpy, &fake_dev, prop, type, format,
PropModeReplace, data, nitems);
+
+ free(data);
}
void rotate() {
Rotation old_r = r;
char buf[256];
char *order;
- int wacom_rotation;
XRRRotations(dpy, DefaultScreen(dpy), &r);
if (old_r == r)

0 comments on commit 43453fe

Please sign in to comment.