aboutsummaryrefslogtreecommitdiff
path: root/src/pq/pq_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq/pq_connect.c')
-rw-r--r--src/pq/pq_connect.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index 8da273b2b..e3a610922 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -125,7 +125,7 @@ GNUNET_PQ_connect (const char *config_str,
125 GNUNET_PQ_reconnect (db); 125 GNUNET_PQ_reconnect (db);
126 if (NULL == db->conn) 126 if (NULL == db->conn)
127 { 127 {
128 GNUNET_free_non_null (db->load_path); 128 GNUNET_free (db->load_path);
129 GNUNET_free (db->config_str); 129 GNUNET_free (db->config_str);
130 GNUNET_free (db); 130 GNUNET_free (db);
131 return NULL; 131 return NULL;
@@ -162,8 +162,7 @@ apply_patch (struct GNUNET_PQ_Context *db,
162 "Applying SQL file `%s' on database %s\n", 162 "Applying SQL file `%s' on database %s\n",
163 buf, 163 buf,
164 db->config_str); 164 db->config_str);
165 psql = GNUNET_OS_start_process (GNUNET_NO, 165 psql = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_NONE,
166 GNUNET_OS_INHERIT_STD_NONE,
167 NULL, 166 NULL,
168 NULL, 167 NULL,
169 NULL, 168 NULL,
@@ -495,9 +494,9 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
495 load_path, 494 load_path,
496 es, 495 es,
497 ps); 496 ps);
498 GNUNET_free_non_null (load_path); 497 GNUNET_free (load_path);
499 GNUNET_free_non_null (sp); 498 GNUNET_free (sp);
500 GNUNET_free_non_null (conninfo); 499 GNUNET_free (conninfo);
501 return db; 500 return db;
502} 501}
503 502
@@ -511,10 +510,10 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
511void 510void
512GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) 511GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db)
513{ 512{
514 GNUNET_free_non_null (db->es); 513 GNUNET_free (db->es);
515 GNUNET_free_non_null (db->ps); 514 GNUNET_free (db->ps);
516 GNUNET_free_non_null (db->load_path); 515 GNUNET_free (db->load_path);
517 GNUNET_free_non_null (db->config_str); 516 GNUNET_free (db->config_str);
518 PQfinish (db->conn); 517 PQfinish (db->conn);
519 GNUNET_free (db); 518 GNUNET_free (db);
520} 519}