Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
7f38470a
Commit
7f38470a
authored
Nov 13, 2015
by
Sebastian Ramacher
Browse files
Fix another invalid free
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
4a1852b0
Changes
1
Show whitespace changes
Inline
Side-by-side
zathura/zathura.c
View file @
7f38470a
...
...
@@ -665,14 +665,13 @@ document_open(zathura_t* zathura, const char* path, const char* password,
}
/* read history file */
char
first_page_column_list_default
[]
=
"1:2"
;
zathura_fileinfo_t
file_info
=
{
.
current_page
=
0
,
.
page_offset
=
0
,
.
scale
=
1
,
.
rotation
=
0
,
.
pages_per_row
=
0
,
.
first_page_column_list
=
first_page_column_list_default
,
.
first_page_column_list
=
NULL
,
.
position_x
=
0
,
.
position_y
=
0
};
...
...
@@ -870,7 +869,7 @@ document_open(zathura_t* zathura, const char* path, const char* password,
/* view mode */
unsigned
int
pages_per_row
=
1
;
char
*
first_page_column_list
=
first_page_column_list_default
;
char
*
first_page_column_list
=
NULL
;
unsigned
int
page_padding
=
1
;
girara_setting_get
(
zathura
->
ui
.
session
,
"page-padding"
,
&
page_padding
);
...
...
@@ -882,8 +881,9 @@ document_open(zathura_t* zathura, const char* path, const char* password,
}
/* read first_page_column list */
if
(
strcmp
(
file_info
.
first_page_column_list
,
""
))
{
if
(
file_info
.
first_page_column_list
!=
NULL
&&
strcmp
(
file_info
.
first_page_column_list
,
""
))
{
first_page_column_list
=
file_info
.
first_page_column_list
;
file_info
.
first_page_column_list
=
NULL
;
}
else
{
girara_setting_get
(
zathura
->
ui
.
session
,
"first-page-column"
,
&
first_page_column_list
);
}
...
...
@@ -893,6 +893,7 @@ document_open(zathura_t* zathura, const char* path, const char* password,
girara_setting_set
(
zathura
->
ui
.
session
,
"pages-per-row"
,
&
pages_per_row
);
girara_setting_set
(
zathura
->
ui
.
session
,
"first-page-column"
,
first_page_column_list
);
g_free
(
file_info
.
first_page_column_list
);
g_free
(
first_page_column_list
);
page_widget_set_mode
(
zathura
,
page_padding
,
pages_per_row
,
first_page_column
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment