[epiphany/mcatanzaro/even-more-scan-build] snapshot-service: try silencing a false-positive warning from scan-build



commit f23dcd15b3178ae7254065163f8e1867604a8383
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Dec 28 09:00:18 2019 -0600

    snapshot-service: try silencing a false-positive warning from scan-build
    
    It thinks path is leaked here, but it's not.

 lib/ephy-snapshot-service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/ephy-snapshot-service.c b/lib/ephy-snapshot-service.c
index a8a06b5ae..b1c9ef752 100644
--- a/lib/ephy-snapshot-service.c
+++ b/lib/ephy-snapshot-service.c
@@ -682,7 +682,7 @@ got_snapshot_path_for_url (EphySnapshotService *service,
   path = ephy_snapshot_service_get_snapshot_path_for_url_finish (service, result, NULL);
   if (path) {
     take_fresh_snapshot_in_background_if_stale (service, snapshot_async_data_copy (data));
-    g_task_return_pointer (task, path, g_free);
+    g_task_return_pointer (task, g_steal_pointer (&path), g_free);
     g_object_unref (task);
   } else {
     ephy_snapshot_service_take_from_webview (task);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]