[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5067 - GNUnet/src/applications/kvstore_sqlite
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5067 - GNUnet/src/applications/kvstore_sqlite |
Date: |
Fri, 15 Jun 2007 16:58:32 -0600 (MDT) |
Author: grothoff
Date: 2007-06-15 16:58:31 -0600 (Fri, 15 Jun 2007)
New Revision: 5067
Modified:
GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c
Log:
leak
Modified: GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c
===================================================================
--- GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c 2007-06-15 22:58:16 UTC
(rev 5066)
+++ GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c 2007-06-15 22:58:31 UTC
(rev 5067)
@@ -332,7 +332,7 @@
unsigned int len;
KVHandle *ret;
sqliteHandle *dbh;
- char *idx;
+ char * idx;
dbh = getDBHandle(database);
if (dbh == NULL)
@@ -343,7 +343,7 @@
len = strlen(table);
sqlite3_bind_text(stmt, 1, table, len, SQLITE_STATIC);
if (sqlite3_step(stmt) == SQLITE_DONE) {
- char *create = malloc(len + 58);
+ char * create = MALLOC(len + 58);
sprintf(create,
"CREATE TABLE %s (gn_key BLOB, gn_val BLOB, gn_age BIGINT)",
@@ -355,21 +355,21 @@
LOG_ERROR,
"sqlite_create");
sqlite3_finalize(stmt);
- free(create);
+ FREE(create);
return NULL;
}
- free(create);
+ FREE(create);
}
sqlite3_finalize(stmt);
/* FIXME: more indexes */
- idx = (char *) malloc(len + 34);
+ idx = MALLOC(len + 34);
sprintf(idx,
"CREATE INDEX idx_key ON %s (gn_key)",
table);
sqlite3_exec(dbh->dbh, idx, NULL, NULL, NULL);
-
+ FREE(idx);
ret = MALLOC(sizeof(KVHandle));
ret->table = STRDUP(table);
ret->db = STRDUP(database);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5067 - GNUnet/src/applications/kvstore_sqlite,
gnunet <=