diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-09-15 09:15:29 +0200 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-09-15 09:20:11 +0200 |
commit | 98fe6c24afa830d9707b0c8e8c41b93fb75845a4 (patch) | |
tree | 3f30aa55202aacda69909fca8db192459116050a /src/xinerama.c | |
parent | 28d044cc6e7513135b860d09076c04c1a01a3493 (diff) | |
download | ratpoison-98fe6c24afa830d9707b0c8e8c41b93fb75845a4.zip |
Plug memory leak in xinerama
If there is only one Xinerama screen we do not care about Xinerama but
we should still free resources we just obtained.
Diffstat (limited to 'src/xinerama.c')
-rw-r--r-- | src/xinerama.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xinerama.c b/src/xinerama.c index cfa6efb..f037b05 100644 --- a/src/xinerama.c +++ b/src/xinerama.c @@ -61,9 +61,13 @@ init_xinerama(void) } xine_screens = XineramaQueryScreens(dpy, &xine_screen_count); - if ((xine_screens == NULL) || (xine_screen_count < 2)) { + if (xine_screens == NULL) { return; } + if (xine_screen_count < 2) { + XFree (xine_screens); + return; + } rp_have_xinerama = 1; #else |