X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=libi3%2Ffont.c;h=c06bae00c86fd6a32be6f897fd36d03ae01c24bc;hp=7d776ad1350054ac1495e9747e9a9158dccc8cf0;hb=2ddf4f2c6d6f304ea0a8f45020d3d83e680f59b1;hpb=81eea19e1e16a8b475a1201935cc30501a83d350 diff --git a/libi3/font.c b/libi3/font.c index 7d776ad1..c06bae00 100644 --- a/libi3/font.c +++ b/libi3/font.c @@ -223,9 +223,7 @@ i3Font load_font(const char *pattern, const bool fallback) { error->error_code); } } - if (error != NULL) { - free(error); - } + free(error); font.pattern = sstrdup(pattern); LOG("Using X font %s\n", pattern); @@ -274,8 +272,7 @@ void free_font(void) { case FONT_TYPE_XCB: { /* Close the font and free the info */ xcb_close_font(conn, savedFont->specific.xcb.id); - if (savedFont->specific.xcb.info) - free(savedFont->specific.xcb.info); + free(savedFont->specific.xcb.info); break; } case FONT_TYPE_PANGO: