Commit 749559f7 authored by Moritz Lipp's avatar Moritz Lipp

Resolve memory leak in db_get_fileinfo

parent 925c9973
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment