Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix brown paper bag bug

  • Loading branch information...
commit 43453fef913c5ef2dad44927717ffe9a90062cd2 1 parent f266bf5
@thjaeger authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 wacomrotate.c
View
5 wacomrotate.c
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.