/*
This file is part of GNUnet
- (C) 2012 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2012 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* Obtain the location of ".my.cnf".
*
* @param cfg our configuration
+ * @param section the section
* @return NULL on error
*/
static char *
{
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);
{
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;