diff options
author | Povilas Kanapickas <povilas@radix.lt> | 2022-02-05 18:53:36 +0200 |
---|---|---|
committer | Povilas Kanapickas <povilas@radix.lt> | 2022-02-05 19:08:22 +0200 |
commit | e6b3d6da2d09cd8139df8f6eb4a552ae01b03807 (patch) | |
tree | e202ad5ba6346a473bd969c982a1ced35bccc753 | |
parent | 6197c0407b22b61bcdd86eeca199c1def1c54ef0 (diff) |
common: Fix uninitialized variable
XIGetProperty may not initialize the data argument in case of server
returning errors.
-rw-r--r-- | tests/common/xit-property.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/common/xit-property.h b/tests/common/xit-property.h index 7fbc132..b0d2818 100644 --- a/tests/common/xit-property.h +++ b/tests/common/xit-property.h @@ -95,7 +95,7 @@ XITProperty<DataType>::XITProperty(::Display *dpy, int deviceid, const std::stri prop = XInternAtom(dpy, propname.c_str(), True); - unsigned char *d; + unsigned char *d = nullptr; unsigned long bytes_after; XIGetProperty(dpy, deviceid, prop, 0, 1000, False, |