mirror of https://github.com/i3/i3
Fix a minor memory leak
When xcb_request_check() returns an error, something has to clean up and free this error. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
2e500f0817
commit
d2f5e7e46e
|
@ -47,6 +47,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw
|
|||
xcb_generic_error_t *error = xcb_request_check(conn, gc_cookie);
|
||||
if (error != NULL) {
|
||||
ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code);
|
||||
free(error);
|
||||
}
|
||||
|
||||
surface->surface = cairo_xcb_surface_create(conn, surface->id, visual, width, height);
|
||||
|
|
Loading…
Reference in New Issue