[libsoup/hsts: 10/36] Add a few assertions



commit 59baee4e6d2205509edc7b2fdaa939fb321bd338
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Aug 23 16:52:01 2018 +0300

    Add a few assertions

 libsoup/soup-hsts-enforcer-db.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/libsoup/soup-hsts-enforcer-db.c b/libsoup/soup-hsts-enforcer-db.c
index 611cd769..7a73eced 100644
--- a/libsoup/soup-hsts-enforcer-db.c
+++ b/libsoup/soup-hsts-enforcer-db.c
@@ -261,6 +261,7 @@ soup_hsts_enforcer_db_changed (SoupHSTSEnforcer *hsts_enforcer,
        if (old_policy && !new_policy) {
                query = sqlite3_mprintf (QUERY_DELETE,
                                         old_policy->domain);
+               g_assert (query);
                exec_query_with_try_create_table (priv->db, query, NULL, NULL);
                sqlite3_free (query);
        }
@@ -276,6 +277,7 @@ soup_hsts_enforcer_db_changed (SoupHSTSEnforcer *hsts_enforcer,
                                         new_policy->max_age,
                                         expires,
                                         new_policy->include_subdomains);
+               g_assert (query);
                exec_query_with_try_create_table (priv->db, query, NULL, NULL);
                sqlite3_free (query);
        }


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