mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:06:00 +01:00
Prevent double-free in zathura_document_free
This commit is contained in:
parent
2ddb04d4ab
commit
735b31e2a5
1 changed files with 3 additions and 0 deletions
|
@ -173,13 +173,16 @@ error_free:
|
|||
if (file != NULL) {
|
||||
g_object_unref(file);
|
||||
}
|
||||
|
||||
g_free(real_path);
|
||||
|
||||
if (document != NULL) {
|
||||
zathura_document_free(document);
|
||||
document = NULL; /* prevent double-free */
|
||||
}
|
||||
|
||||
g_free(document);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue