mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Replace malloc/free with g_malloc/g_free
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user