]> git.sur5r.net Git - i3/i3/commitdiff
Fix use of err after it is freed 2960/head
authorOrestis Floros <orestisf1993@gmail.com>
Sat, 16 Sep 2017 22:14:47 +0000 (01:14 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Sat, 16 Sep 2017 22:14:47 +0000 (01:14 +0300)
src/randr.c

index bc7916964356eb75ff760fa0dc07e5546af758da..88cad7c51d5c9df1c2f32f44463665da4c9b31cd 100644 (file)
@@ -1048,8 +1048,8 @@ void randr_init(int *event_base, const bool disable_randr15) {
         xcb_randr_query_version_reply(
             conn, xcb_randr_query_version(conn, XCB_RANDR_MAJOR_VERSION, XCB_RANDR_MINOR_VERSION), &err);
     if (err != NULL) {
-        free(err);
         ELOG("Could not query RandR version: X11 error code %d\n", err->error_code);
+        free(err);
         fallback_to_root_output();
         return;
     }