Merge pull request #4109 from i3/orestisfl-patch-2

i3-input: Fix memory leaks
This commit is contained in:
Orestis Floros 2020-05-31 12:15:45 +02:00 committed by GitHub
commit db2526c39c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -367,9 +367,8 @@ free_resources:
}
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[] = {
@ -424,6 +423,9 @@ int main(int argc, char *argv[]) {
return 0;
}
}
if (!format) {
format = "%s";
}
printf("using format \"%s\"\n", format);
@ -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)