mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 11:36:01 +01:00
Resolve memory leak in db_get_fileinfo
This commit is contained in:
parent
925c9973fa
commit
749559f7f5
1 changed files with 6 additions and 3 deletions
|
@ -260,11 +260,14 @@ zathura_db_get_fileinfo(zathura_database_t* db, const char* file, unsigned int*
|
|||
return false;
|
||||
}
|
||||
|
||||
*page = g_key_file_get_integer(db->history, file, KEY_PAGE, NULL);
|
||||
*offset = g_key_file_get_integer(db->history, file, KEY_OFFSET, NULL);
|
||||
*scale = strtod(g_key_file_get_string(db->history, file, KEY_SCALE, NULL), NULL);
|
||||
*page = g_key_file_get_integer(db->history, file, KEY_PAGE, NULL);
|
||||
*offset = g_key_file_get_integer(db->history, file, KEY_OFFSET, NULL);
|
||||
*rotation = g_key_file_get_integer(db->history, file, KEY_ROTATE, NULL);
|
||||
|
||||
char* scale_string = g_key_file_get_string(db->history, file, KEY_SCALE, NULL);
|
||||
*scale = strtod(scale_string, NULL);
|
||||
g_free(scale_string);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue