summaryrefslogtreecommitdiff
path: root/src/mysql/mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mysql/mysql.c')
-rw-r--r--src/mysql/mysql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mysql/mysql.c b/src/mysql/mysql.c
index 098213b33..22804d474 100644
--- a/src/mysql/mysql.c
+++ b/src/mysql/mysql.c
@@ -292,7 +292,7 @@ GNUNET_MYSQL_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
{
struct GNUNET_MYSQL_Context *mc;
- mc = GNUNET_malloc (sizeof (struct GNUNET_MYSQL_Context));
+ mc = GNUNET_new (struct GNUNET_MYSQL_Context);
mc->cfg = cfg;
mc->section = section;
mc->cnffile = get_my_cnf_path (cfg, section);
@@ -365,7 +365,7 @@ GNUNET_MYSQL_statement_prepare (struct GNUNET_MYSQL_Context *mc,
{
struct GNUNET_MYSQL_StatementHandle *sh;
- sh = GNUNET_malloc (sizeof (struct GNUNET_MYSQL_StatementHandle));
+ sh = GNUNET_new (struct GNUNET_MYSQL_StatementHandle);
sh->query = GNUNET_strdup (query);
GNUNET_CONTAINER_DLL_insert (mc->shead, mc->stail, sh);
return sh;