Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4109 from i3/orestisfl-patch-2
Browse files Browse the repository at this point in the history
i3-input: Fix memory leaks
  • Loading branch information
orestisfl committed May 31, 2020
2 parents c9f8183 + 128f9c0 commit db2526c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions i3-input/main.c
Expand Up @@ -367,9 +367,8 @@ static xcb_rectangle_t get_window_position(void) {
}

int main(int argc, char *argv[]) {
format = sstrdup("%s");
char *socket_path = NULL;
char *pattern = sstrdup("pango:monospace 8");
char *pattern = NULL;
int o, option_index = 0;

static struct option long_options[] = {
Expand Down Expand Up @@ -424,6 +423,9 @@ int main(int argc, char *argv[]) {
return 0;
}
}
if (!format) {
format = "%s";
}

printf("using format \"%s\"\n", format);

Expand All @@ -440,7 +442,7 @@ int main(int argc, char *argv[]) {
symbols = xcb_key_symbols_alloc(conn);

init_dpi();
font = load_font(pattern, true);
font = load_font(pattern ? pattern : "pango:monospace 8", true);
set_font(&font);

if (prompt != NULL)
Expand Down

0 comments on commit db2526c

Please sign in to comment.