[epiphany] Fix memory leak in take_fresh_snapshot_in_background_if_stale
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix memory leak in take_fresh_snapshot_in_background_if_stale
- Date: Sun, 10 Jan 2021 15:27:42 +0000 (UTC)
commit 33e8446d774f6a5f1a74d8f15315b4c17c0338ed
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Sat Jan 9 14:15:36 2021 +0100
Fix memory leak in take_fresh_snapshot_in_background_if_stale
Fix SnapshotAsyncData in case the snapshop freshness is not stale.
lib/ephy-snapshot-service.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/ephy-snapshot-service.c b/lib/ephy-snapshot-service.c
index 55869ed82..cfa01401f 100644
--- a/lib/ephy-snapshot-service.c
+++ b/lib/ephy-snapshot-service.c
@@ -655,6 +655,8 @@ take_fresh_snapshot_in_background_if_stale (EphySnapshotService *service,
data,
(GDestroyNotify)snapshot_async_data_free);
ephy_snapshot_service_take_from_webview (task);
+ } else {
+ snapshot_async_data_free (data);
}
}
@@ -673,7 +675,6 @@ got_snapshot_path_for_url (EphySnapshotService *service,
GAsyncResult *result,
GTask *task)
{
-#ifndef __clang_analyzer__
SnapshotAsyncData *data = g_task_get_task_data (task);
char *path;
@@ -685,7 +686,6 @@ got_snapshot_path_for_url (EphySnapshotService *service,
} else {
ephy_snapshot_service_take_from_webview (task);
}
-#endif
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]