Replace malloc/free with g_malloc/g_free

This commit is contained in:
whydoubt
2004-12-31 05:25:11 +00:00
parent 680e997365
commit f09f9438d3
9 changed files with 27 additions and 25 deletions

View File

@@ -88,8 +88,7 @@ GMdbDataWindow *dataw = NULL;
for (i=0;i<table->num_cols;i++) {
/* bind columns */
bound_data[i] = (char *) malloc(MDB_BIND_SIZE);
bound_data[i][0] = '\0';
bound_data[i] = (char *) g_malloc0(MDB_BIND_SIZE);
mdb_bind_column(table, i+1, bound_data[i], NULL);
/* display column titles */
@@ -110,7 +109,7 @@ GMdbDataWindow *dataw = NULL;
/* free the memory used to bind */
for (i=0;i<table->num_cols;i++) {
free(bound_data[i]);
g_free(bound_data[i]);
}
/* add this one to the window list */